Stoner's Spanish team mate Dani Pedrosa, who led for the first 10 of the 26 laps, made it a works Honda one-two finish at the Assen circuit with Italian Andrea Dovizioso third for the Tech3 Yamaha team.
Lorenzo, who had started the day 25 points clear of world champion Stoner and was favourite to win, had his bike swept from under him when Spain's Alvaro Bautista lost control of his Gresini Honda and slid into him.
Bautista will be put to the back of the Sachsenring MotoGP grid as a punishment for taking Lorenzo out.
Both Lorenzo and Stoner now have 140 points, with the Spaniard leading on race wins going into the eighth round at Germany's Sachsenring circuit next weekend.
Stoner's win, after securing pole position on Friday following a heavy practice crash, was his first since he announced in May that he would be retiring at the end of the season.
"We don't want to take back points in the championship with another rider crashing," Stoner said. "It's very unfortunate for him.
"I think today we rode pretty well. We had a very tough weekend, the injuries have been pretty heavy," added the Australian, who took painkillers before the race.
"I still didn't have any strength in my right leg but my shoulders and everything felt a lot better and they were able to compensate for me in the rest of the track."
Stoner had dropped back to second at the start but it was clearly just a case of when rather than whether he went past Pedrosa and he met no resistance when he did so.
The Spaniard said he had tried to keep up with him but had not been able to. "I wasn't really there for the victory at the end," he added.
Lorenzo's American team mate Ben Spies was fourth with Britain's Cal Crutchlow finishing fifth after almost getting caught in the starting accident on the second Tech3 Yamaha.
Spanish riders won in both the Moto2 and Moto3 classes, with Marc Marquez triumphant in the former and Maverick Vinales victorious in the latter.