Timo Bernhard overtook Ho-Pin Tung in Chan's LMP2 class Oreca-Gibson with less than an hour to go to claim a 19th Le Mans title for the German constructor.
While Bernhard, who won with Audi in 2010, and his New Zealand co-drivers Earl Bamber and Brendon Hartley were celebrating, Toyota's agonising wait for a maiden title continued.
As night fell on Saturday Toyota were sitting pretty with the car of Kamui Kobayashi, Mike Conway and Stephane Sarrazin holding a comfortable lead.
But with Kobayashi - who had set a record lap for pole - behind the wheel his hybrid car limped out of contention with clutch problems.
A little later, the Toyota of Japanese rookie Yuji Kunimoto, Nicolas Lapierre and Jose Maria Lopez was also kyboshed after a shunt in the Dunlop Chicane.
The impish Le Mans gods that wreaked havoc on Toyota also poked fun at Porsche, the constructor's No.1 car with Andre Lotterer driving breaking down with a massive 13-lap lead and only three hours to run.
As Lotterer climbed out of his stricken machine and broke down in tears, Chan was dreaming of a historic first ever Le Mans success for a privately entered team.
But the remaining Porsche 919 Hybrid, plumb last on Saturday evening, reeled in the film star's surprise leader, pouncing to seize control on the fastest section of the fabled Sarthe circuit on lap 348.
As a bleary-eyed and sun-baked 250,000 crowd watched on, Bernhard crossed the line with a lap to spare over Dutch-born Tung with Nelson Piquet Junior in another Oreca in third.
Le Mans 24 Hour Race final standings on Sunday:
1. Bamber-Bernhard-Hartley (NZL-GER-NZL/Porsche 919 Hybrid LMP1) 367 laps
2. Jarvis-Laurent-Tung (GBR-FRA-CHN/Oreca-Gibson LMP2) at 1 lap (LMP2 class)
3. Piquet Jr-Beche-Hansson (BRA-SUI-DEN/Oreca-Gibson) 3 laps
4. Gommendy-Brundle-Cheng (FRA-GBR-CHN/Oreca-Gibson) 4 laps
5. Panciatici-Ragues-Negrao (FRA-FRA-BRA/Alpine-Gibson) 5 laps
6. Owen-De Sadeleer-Albuquerque (USA-SUI-POR/Ligier-Gibson) 5 laps
7. Allen-Matelli-Bradley (AUS-FRA-GBR/Oreca-Gibson) 6 laps
8. Vergne-Graves-Hirschi (FRA-THA-SUI/Oreca-Gibson) 7 laps
9. Buemi-Davidson-Nakajima (SUI-GBR-JPN/Toyota TS050 Hybrid) 9 laps
10. Sernagiotto-Lacorte-Belicchi (ITA/Dallara-Gibson) 14 laps