The Italian, on his Yamaha, started from pole and led almost all the way, although reigning world champion Marquez did briefly overtake seven laps from the end.
Rossi quickly regained the lead and then held off one last desperate push on the final corner by the Spaniard, on a Honda, to claim his third win of the season and the 111th victory of his illustrious career.
"This win is very important because I was competitive all weekend," said Rossi, whose final winning margin was 1.242 seconds.
For Rossi it was a seventh MotoGP win on the famous Assen track, one more than the six victories recorded by his legendary Italian compatriot Giacomo Agostini.
Also Read
He has now won nine times in all categories at the only circuit to stage a leg of the world championship every year since its inception in 1949.
As he chases a first world championship title since 2009, Rossi stretches his advantage over nearest rival Jorge Lorenzo to 10 points.
Spaniard Lorenzo, also on a Yamaha, had won the last four races, including in Catalonia a fortnight ago.
He finished third this time, but could be pleased with his day having started from eighth on the grid.
"It is a very good result knowing the situation was difficult, starting from eighth place," Lorenzo said.
"I didn't have the pace of Valentino and Marc so I realised I had to try not to lose this third place which is very important for the championship."
The ninth race of the season will be at Sachsenring in Germany in two weeks time.