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.
Valencia Grand Prix:
1. Dani Pedrosa
2. Katsuyuki Nakasuga
3. Casey Stoner
4. Alvaro Bautista
5. Michele Pirro
6. Andrea Dovizioso
7. Karel Abraham
8. Danilo Petrucci
9. James Ellison
10. Valentino Rossi
11. Aleix Espargaro
12. Randy De Puniet
13. Hiroshi Aoyama
14. Colin Edwards