The result gives Marquez a shot at clinching the world championship in Malaysia next week, despite title rival Pol Espargaro's best efforts to hang on to him.
Victory looked unlikely when Marquez stalled on the startline, getting away virtually last in the 32-bike field.
But Marquez's recovery was incredible. He was back up to ninth by the end of lap one, and into podium contention by lap five.
Espargaro's Pons team-mate Esteve Rabat had taken over from early leader Scott Redding to make an initial break at the front by that time. Rabat stayed ahead as long as he could, before Marquez made it through on lap nine.
Despite the speed of his comeback ride, Marquez was unable to escape once in front, as Espargaro tried his utmost to keep the pressure on.
A late error seemed to have cost Espargaro his chance, before a mighty final lap got him back on Marquez's tail.
He could not beat the 2013 Honda MotoGP rider, though, as Marquez opened up a 53-point championship lead with victory.
Rabat hung on to a podium finish in third.
Redding fended off Tom Luthi to take fourth, while Simone Corsi resisted top local rider Takaagi Nakagami to earn sixth.
Former champion Toni Elias ran as high as third on his return to Moto2 with Italtrans, before crashing out in the closing stages.
Andrea Iannone's miserable weekend did not improve in the race. The regular frontrunner finished a quiet 18th.