At the age of 20 years and 266 days, Marquez beat Freddie Spencer's age record of 21 years and 258 days from 1983.
The last rookie to win the title was American Kenny Roberts in 1978.
Marquez won the 125cc title in 2010 and the Moto2 title last year before joining the top-tier circuit. He is just the fourth rider to have won titles in all three categories.
Marquez's teammate Dani Pedrosa crossed second after an entertaining joust with Lorenzo on the opening laps.
Lorenzo pushed his Yamaha past the pole-sitting Marquez at the start but then tried to apply a strategy of going slow to give other riders a better chance to overtake Marquez.
"I tried everything I could, but it wasn't to be," Lorenzo said. "The other pilots were just too slow to keep up."
Marquez finished a comfortable seven seconds ahead of fifth-place Alvaro Bautista. Valentino Rossi was fourth.
Despite breaking his collarbone earlier this year, Lorenzo earned a circuit-best eight wins this season two more than Marquez. He won the last three races to turn what appeared to be a sure title for Marquez into one of MotoGP's closest championship battles in years.
"It was a season to remember," Lorenzo said. "We have to congratulate Marc because he had an incredible season and deserved to be the champion."
This was the third time that two-time champion Lorenzo finished runner-up.
Earlier, Maverick Vinales became the Moto3 champion by winning the race, edging runner-up Alex Rins after fellow challenger Luis Salom crashed.
Vinales and Rins changed places several times through the 24 laps around the 4-kilometer (2.48 mile) Cheste Circuit before Vinales finally went in front for good before the final straight to the finish line.
Only three points separated points leader Salom, Vinales and Rins entering the decisive event.
But Salom's chances of winning the title evaporated when he fell in a curve with 10 laps to go while riding a close third behind Rins and Vinales.
"It was a very hard fought title, but I think with all the work I put in I deserved to win," Vinales said. "Alex had a great race, we even brushed each other at one point, and I have to congratulate him as well."
Pol Espargaro had already clinched the Moto2 title heading into the final race, which he was leading until he crashed.
Hometown favorite Nicolas Terol went on to win the race, followed by Jordi Torres and Johann Zarco.
Spanish riders swept the titles of all three categories this season to the delight of the around 100,000 fans in attendance.
- AP