Pupo scored 34 shots in the final, beating silver medallist Vijay Kumar of India by four shots. Ding Feng of China won bronze with 27 points.
"I can't believe it but it's true," Pupo said. "This is the height of glory for the people in Cuba. This also means a lot for my family as my wife (Yinnay Cruz) is pregnant."
It was Pupo's first major championship of his career. His only previous victory came at a World Cup event in Buenos Aires in 1998. At the past three Olympics, he finished ninth, eighth and seventh respectively.
"This is massive for the sport of shooting in Cuba, it's wonderful," he said. "It's the first gold, we've had three bronzes before. I did not think I was going to win but I believed I could and I had to believe in myself to be able to concentrate."
Pupo said his mindset changed during the final as he slightly went ahead of the field.
"There were a lot of things going on in my mind," Pupo said. "First I was thinking about bronze, then I started thinking I could win it."
Pupo reached the final in third position after Alexei Klimov of Russia set a world record in qualification with 592 points, a total that beat his own mark from 2006 by one point.
The world record gave Klimov no advantage for the final as all competitors started from zero under the new Olympic format, consisting of eight series in which each shooter fires five shots within four seconds.
From the fourth series, the lowest scoring competitor is eliminated from the competition. Scoring is hit-or-miss, with any score above 9.6 counting as a hit.
Before the final, Klimov acknowledged to being "a little nervous" but added he was "feeling very positive ... New rules mean I must start from scratch."
However, Klimov missed five shots in total in the third and fourth round and could not catch up afterward. He was eliminated after the sixth of the eight series.
Klimov became the second shooter at the London Olympics to set a world record on Friday, after Sergei Martynov of Belarus beat the 12-year-old world record in 50-meter rifle prone by 0.7 points, winning gold with a final score of 705.5 points.
After finishing second in two World Cup events this year, Christian Reitz of Germany was regarded as one of the favourites in 25M rapid fire pistol. However, Reitz missed four times in his first two series and was the first shooter to be eliminated in the final.
Fellow German Ralf Schumann, the most decorated shooter in history with three golds and two silvers, shot a 577 in qualification, six points short of the limit.Suggest a correction