Yamaha rider Lorenzo moved ahead of his rival on the opening lap and kept Pedrosa and his Repsol Honda team-mate Marc Marquez at bay for the remainder of the race to take his third win of the season.
Pedrosa eventually claimed second place, but only after overseeing a late onslaught from rookie Marquez, who narrowly failed to pip his fellow Spaniard to the line.
Behind the Spanish trio, Valentino Rossi rode to a lonely fourth place but there was disappointment for Britain's Cal Crutchlow.
The Tech 3 Yamaha rider started from second as he targeted a third-consecutive podium finish, but his hopes were dashed on lap six as he crashed out of the race.
Stefan Bradl was fifth aboard the lone LCR Honda, while Crutchlow's team-mate Bradley Smith produced a gutsy ride to record the best result of his rookie season in sixth.
Smith is still struggling after grinding the little finger of his left hand down to the bone in a practice crash at Mugello, but battled through the pain from 11th on the grid.
Andrea Dovizioso, Aleix Espargaro, Colin Edwards and Michele Pirro rounded out the top 10.
"A perfect day, to be honest I didn't expect to win, I knew I had some chance but not like in Mugello where I was more convinced we could get the victory," said Lorenzo.
"It was really difficult physically as it was the hottest race of the year. I kept pushing 100% all race because any mistake would have been a disaster.
"I was surprised at the start as I expected to just pass Cal but I passed Dani also. I took profit from it and tried to open the gap but it was not enough to go away, Dani was there and we played some games, I was 0.5 seconds ahead then 0.2; I was going then he was recovering.
"Finally because I was tough mentally and never gave up I could open, in the last five laps, a little gap that was enough to win."