The 2007 world champion, who started from pole for the 20th time of his career, finished 5.148sec ahead of Spain's Dani Pedrosa (Honda) at the Motorland Aragon circuit in north-east Spain.
American Nicky Hayden, also on a Ducati, made it a memorable day for the Italian bike manufacturers when he trumped Spain's Jorge Lorenzo on the final lap to claim third, at 9.496sec, and deprive the Yamaha rider a podium finish for the first time in 14 races.
1. Casey Stoner AUS Ducati Marlboro Team 42m 16.53s
"It's been too long between wins, that's for sure," said Stoner, who last won in Malaysia in October last year.
"We started out pretty well this weekend, and we got on with the track. We progressed and got better."
Stoner admitted to having fallen in final preparations ahead of the race, taking a tumble over the white lines at turn 14.
"I was a little bit nervous this morning, but I'm really happy to bring it home," he said. "It was unexpected for us."
2. Dani Pedrosa ESP Repsol Honda Team 42m 21.678s
"Ducati were very strong, with both riders on the podium.
"I tried everything, I didn't start well but I recovered," he said of his battle with Casey.
"But I was too far from Casey. We did many laps at the same pace but couldn't get him on corners. He did good."
3. Nicky Hayden USA Ducati Marlboro Team 42m 26.026s
"I didn't mean to leave it that late," said Hayden of his nail-biting fight with Lorenzo. "In the final laps, Jorge kept the doors shut.
"It's been a very good weekend for us."
4. Jorge Lorenzo ESP Fiat Yamaha Team 42m 26.11s
5. Ben Spies USA Monster Yamaha Tech 3 42m 30.301s
6. Valentino Rossi ITA Fiat Yamaha Team 42m 43.86s
7. Marco Simoncelli ITA San Carlo Honda Gresini 42m 45.041s
8. Alvaro Bautista ESP Rizla Suzuki MotoGP 42m 51.784s
9. Marco Melandri ITA San Carlo Honda Gresini 42m 51.923s
10. Aleix Espargaro ESP Pramac Racing 42m 51.997s
11. Hector Barbera ESP Paginas Amarillas Aspar 42m 52.052s
12. Colin Edwards USA Monster Yamaha Tech 3 43m 1.89s
13. Hiroshi Aoyama JPN Interwetten Honda MotoGP 43m 4.849s
14. Mika Kallio FIN Pramac Racing 43m 14.577s
DNF:
Andrea Dovizioso ITA Repsol Honda Team
Randy de Puniet FRA LCR Honda MotoGP