Pedrosa, who had qualified on pole for the fourth successive race, lost out to MotoGP world champion Casey Stoner and team-mate Nicky Hayden into turn one, but was quickly back past Hayden and chasing down the Ducati star.
Stoner, a ten times 2007 race winner, was unable to shake the determined Spaniard and Pedrosa eventually breezed past the Australian along the start/finish straight on lap six of 30. Stoner did all he could to keep pressure on his fellow 22-year-old, but Dani - the only Honda rider to win a race this year - edged ever more slightly away with almost every lap.
Pedrosa was 1.8secs clear by the halfway point and went on to take his second victory of the season by 5.447secs - then lit the celebratory fireworks in front of 132,500 cheering trackside fans. The victory was Pedrosa's fourth in the premier-class, first at home and also gave him second in the world championship after Valentino Rossi's painful weekend came to a 'pointless' conclusion.
Rossi, who fractured three bones in his right hand during a spectacular qualifying fall, kept his perfect eleven-year grand prix attendance alive by braving the pain on Sunday - and needed just one point to hold on to second in the world championship.
The Italian began the race from 17th on the grid, took 16th on lap seven, then gingerly passed Shinya Nakano for 15th and the final world championship point on lap 14... but it all came to nothing when Rossi suffered a technical problem into turn one on lap 18. The former five times MotoGP world champion tried to continue, but was forced to admit defeat and pull into the pits two laps later, marking his third DNF of the season.
With Rossi's team-mate Colin Edwards finishing just 13th on his final factory ride, Fiat Yamaha slipped from second to fourth in the teams' championship standings, with Repsol Honda taking second behind Ducati Marlboro as Rizla Suzuki moved up to third.
Meanwhile, Stoner's safe second position gave him a final 2007 points haul of 367 – a massive 125 above nearest rival Pedrosa and the equivalent of five race wins, illustrating just how overwhelming the Australian's season has been.
Completing the Valencia podium was John Hopkins, who charged forwards from seventh on the grid during his final ride for Rizla Suzuki. Hopper's fourth podium of the year also gave the Anglo-American, who will join Kawasaki next season, fourth in the final world championship standings.
Marco Melandri had held that position heading into the event, but the 2008 factory Ducati rider qualified just tenth before winning an exciting duel with Repsol Honda rider Hayden for fourth heading into the closing stages.