The 20-year-old rookie started on pole but needed to reel in world champion Lorenzo, who had made a flying start to hit the front, and he eventually passed the Yamaha rider with 10 laps to go and cruised to his sixth win.
Marquez's Honda team mate Pedrosa was in second place when he high-sided his bike and crashed as he came out of a corner with 18 laps to go, after the two riders clipped each other.
Italian Valentino Rossi came in third ahead of Spaniard Alvaro Bautista, Germany's Stefan Bradl and Britain's Cal Crutchlow after a thrilling final-lap tussle between the four.
Championship leader Marquez moved on to 278 points with four races left, 39 ahead of second-placed Lorenzo. Pedrosa is third with 219 points.
"Once again we have not done well at the start and it is something we have to improve on for the future," Marquez told Spanish broadcaster Telecinco.
"I was recovering (from the poor start) when Dani passed me but I slowly found some more speed."
Marquez was asked if there had been contact between him and Pedrosa moments before his team mate crashed, something that was not clear from television replays.
"I touched him a little with my elbow," Marquez said. "But they are telling me I may have hit his traction control cable and it was for this reason he fell. It was really bad luck."
Pedrosa, who was celebrating his 28th birthday, was taken to the circuit hospital for a check-up but did not seem to have suffered a serious injury when he spoke after the race.
"Marc is always pushing to the very limit when he has riders in front of him," a clearly unhappy Pedrosa told Telecinco.
"As has been happening almost all season he was coming at me from behind. When he touched me, he broke the sensor for the traction control and this is how my race finished.
"I fell because of this....this...I don't know what to call it.
"Through the years these little things keep happening. Many of us more experienced riders have tried to calm those with less experience. It isn't a case that anything goes in these races."
On his injury, he said: "My pelvis is very sore because I fell very hard on my backside. We'll see how I am in the morning."
Lorenzo missed out on making it a hat-trick of consecutive wins when Marquez nipped inside him with 10 laps to go.
"We have had a lot of problems with the set-up of the bike over the weekend but there are no excuses," Lorenzo said.
"Marc has been much quicker than us and we have to congratulate him and wait for the next race."
Spaniard Nico Terol won the Moto2 race ahead of compatriots Esteve Rabat and Pol Espargaro, with championship leader Scott Redding of Britain fourth.
Second-placed Espargaro closed to within 20 points of Redding in the Moto2 world championship.
There was another Spanish winner in Moto3 with Alex Rins finishing ahead of Maverick Vinales and Alex Marquez. Championship leader Luis Salom was fourth.