The 32-year-old American seemed in a hurry to make up for lost time following a long rain delay when she raced through the first set but when Cornet began to dig in her powerful game began to crumble in front of a stunned crowd on Court One.
Persistent rain at the All England Club meant only two games were possible before the players were running for cover from the showers. When they returned four hours later Williams took charge.
The 24-year-old Cornet, who had already beaten Williams this year, refused to fade away though and with her opponent looking uncomfortable moving on the grass she took the second set with some accurate shot-making.
A desperate-looking Williams fought off break points in the opening game of the decider but Cornet turned the screws at 2-2 to move ahead and then broke serve again to lead 5-2.
World number one Williams looked set to launch a late escape as she clawed back to 4-5 but Cornet held her nerve when she served for the match for a second time, moving to match point when Williams bundled an easy volley into the net.
Williams suffered her earliest exit from the All England Club since 2005 when she chased down a Cornet dropshot but smacked an attempted backhand pass into the net.
"I just cannot believe it," Cornet, who has reached the last 16 of a grand slam for only the second time in 34 attempts, said in a courtside interview.
"After the break because of the rain I couldn't move my legs, I was so slow. After 6-1 in 15 minutes I was like this will be tough. But I finally made it through, I don't know how just with my heart and the help of the crowd."
Serena's defeat follows that of sister Venus to Petra Kvitova in the third round on Friday.
"I think everyone in general plays the match of their lives against me," Serena told reporters. "I'm pretty sure that the next match, it won't be the same.
"It's okay, though. Sometimes it happens. You work hard, maybe it's not for today, maybe it's for tomorrow."
Cornet, the 25th seed, will face Canada's rising force Eugenie Bouchard for a place in the quarter-finals.
- Sports & Recreation
- All England Club