By winning, Marquez moved back to the top of the World Championship leaderboard going into the mid-season break - with only ten points separating first and fourth place.
Marquez was joined on the podium by German rookie Jonas Folger, who put in a stunning ride to finish second and secure the first podium finish of his MotoGP career, much to the delight of the home crowd.
Dani Pedrosa rode a lonely race to finish third, and was over 11 seconds off the pace of his Repsol Honda team-mate by the time he crossed the chequered flag.
Marquez started the race from pole position for the eighth straight year - and proved early why he is dubbed "The King of the Ring" when he got the holeshot off the start and took the early lead, while Pedrosa jumped ahead of Danilo Petrucci to move into second on the opening lap.
Folger started the race in fifth, which was the highest starting grid position of his career - and within three laps, the German rider had moved his Tech 3 Yamaha into the top three by passing Petrucci and Jorge Lorenzo.
On the next lap, the crowd erupted when Folger made a brave move to dive down the inside of Pedrosa and take second place - with his sights set on Marquez and the race lead.
The two riders jostled for position while Pedrosa slightly fell off the pace - and on Lap 6, Folger roared down the straight and passed Marquez to lead his home Grand Prix.
As the laps ticked on, the gap between the front two and Pedrosa started to widen - and on Lap 10, the margin was over two seconds, as the battle out front started to heat up.
On Lap 11, Folger faltered when he ran wide on a turn - and allowed Marquez to snatch back the lead, but the German would not go away and continued to push Marquez.
While Folger and Marquez duked it out at the front of the field, the race for fourth was intensifying behind them - as Petrucci fought off Valentino Rossi and Andrea Dovizioso who were close behind.
However, Petrucci started to lose his pace and fell down the field, while Maverick Vinales began to surge - rising from 10th to 6th at the mid-point of the race, joining Rossi and Dovizioso in the battle for fourth.
With ten laps to go, Vinales made a move past Rossi - as the teammates dueled for valuable championship points, while Dovizioso struggled to find a way past the Yamaha duo.
As this took place, Marquez and Folger continued to battle - and the pair opened up a six-second gap on Pedrosa and a ten-second gap on the rest of the field.
Marquez and Folger were neck and neck for the better part of ten laps - and looked to be setting up a grandstand finish, as they were never separated by more than half a second going into the final three laps.
However, a slip up from Folger proved costly - as the rookie ran wide coming out of the straight on Lap 28, handing valuable time to Marquez, who was one second faster than his German rival on this lap.
This allowed Marquez to race away into clear air and eventually cross the chequered flag 3.3 seconds ahead of Folger, while Pedrosa finished in third - and was 11.5 seconds off the pace of his Honda team-mate.
Maverick Vinales finished fourth, which allowed him to move into second in the Championship race, while Valentino Rossi crossed the line in fifth.
Alvaro Bautista was the next to cross the line, finishing three seconds clear of Aleix Espargaro - while Andrea Dovizioso, Johann Zarco and Cal Crutchlow rounded out the top ten.
Jorge Lorenzo's Ducati struggles continued, as the former World Champion finished in 11th - while Australian rider Jack Miller finished 15th.