Yamaha test rider Katsuyuki Nakasuga finished in a shock second, while Casey Stoner hunted down Alvaro Bautista to snatch a podium place in his final MotoGP appearance before retirement.
Lorenzo had been one of the few riders to correctly choose slick tyres for the drying conditions, alongside Nakasuga and Stefan Bradl.
Pole sitter Pedrosa realised his wet tyre error on the warm-up lap and was joined by Nicky Hayden, Cal Crutchlow and Alvaro Bautistato in pulling into the pits to change bikes, meaning an end of pitlane start.
Slick tyres soon began to pay off with Lorenzo rising from eighth to first in the space of four laps, as more and more wet-tyre riders peeled into pitlane.
Once all were on dry bikes, Lorenzo was leading by three seconds from title runner-up Pedrosa, with Bradl third, Nakasuga fourth and Cal Crutchlow fifth. Bradl crashed out soon after.
Pedrosa caught Lorenzo after ten laps, but then ran wide and lost five-seconds.
However Lorenzo then got into a tank-slapper while trying to lap James Ellison, just before the halfway mark of the 30 laps - which turned into a massive highside on corner exit.
The Yamaha star was left fuming but lucky not to be hurt as he trudged through the gravel to only his second non-score of the year.
The incident left Pedrosa with a huge lead over Crutchlow - who also started from pit lane - but the Englishman then crashed with seven laps to go, ending his hopes of rising higher than seventh in the standings.
Nakasuga, who impressed with sixth in last year's damp Valencia race, thus secured a shock second place in only his sixth grand prix appearance!
Meanwhile Stoner - well outside the top ten early in the grand prix ? got ever faster and passed Gresini Honda's Bautista to claim the final podium place with two laps to go.
27-year-old double champion Stoner waved to his Repsol Honda team, who were hanging off the pit wall and holding a pit board saying "Going Fishing", as he took the flag for the final time in MotoGP.
Stoner was the highest ranked rider to swap bikes during the actual race.
Fifth for Gresini's Michele Pirro was the best ever result for a CRT rider, while Andrea Dovizioso (Tech 3), Karel Abraham (Cardion), Danilo Petrucci (Ioda) and Ellison (PBM) followed.
Valentino Rossi's last Ducati ride ended in tenth place and one lap down, while team-mate Hayden was an early faller.
Pedrosa concluded the season 18 points behind Lorenzo and with a best ever seven wins, one more than Lorenzo this year. Third in the standings Stoner took five wins, but missed three races due to ankle surgery.
Dovizioso was the top satellite rider with fourth overall in this year's championship, with Bautista's Valencia performance confirming a career-best fifth from Rossi and Crutchlow.
Riders and teams now have just one day off to celebrate before preparations for the 2013 season begin in earnest with a post-race test at Valencia on Tuesday and Wednesday - without Casey Stoner.