Moldoveanu held his nerve with a final shot of 10.3 to hold off his rival, who finished just 0.6 behind.
The duo both topped the qualification by equalling the Olympic record and swapped top spots in the final a number of times before Moldoveanu prevailed.
Behind Campriani, Gagan Narang won a bronze medal for India, which was some consolation for the hundreds of Indian supporters crammed into the rifle range after Abhinav Bindra's early exit.
Bindra won India's first individual gold medal at Beijing 2008 four years ago but could only finish 16th in qualifying.
He was eventually placed 24th, while the qualification round was won by Campriani, the world number one.
Moldoveanu admitted afterwards he is still some way from becoming his country's most famous Olympian.
'I don't think I can compare to Nadia Comaneci (former Romanian gymnast) but I would like to dedicate my medal to the people of Romania,' he said.
I don't think I can compare to Nadia Comaneci (former Romanian gymnast) but I would like to dedicate my medal to the people of Romania.Alin George Moldoveanu
'I don't know what will be happening in Romania and I will decide how to celebrate later. I'm very happy.'
Campriani is Italy's second shooting medallist at London 2012 after Luca Tesconi also took silver in the 10m Air Pistol.
He said: 'Hopefully these two medals will give the sport a lot of publicity in Italy.'