"Titane" tells the story of a woman who has sex with cars and kills without a care, with brutal scenes that had many cinema-goers shielding their eyes during the opening night.
Lee, the first black man to lead the jury, read out the winner at the very start of the prize ceremony, rather than introducing the first award of the night for best actor.
After an awkward pause and regrouping, the best actor award went to US actor Caleb Landry Jones for his chilling performance in "Nitram" about Australia's worst mass shooting.
Making a film about the Port Arthur massacre in 1996, in which 35 people died, triggered harsh criticism of director Justin Kurzel in Australia.
But critics were won over at the Cannes premiere, with Variety calling it a "devastating study of atrocity" that shows "quiet respect for the victims' dignity".
It was a huge night, too, for the previously unknown Norwegian actress Renate Reinsve, who was rocketed to stardom by her role in "Worst Person in the World".
Her role as a twenty-something searching for her identity and pinballing through relationships was a sensation, and caught the 33-year-old totally unprepared.
"No one has seen me in anything," she told AFP after the premiere. "The other day I woke up and I puked. And today I woke up and I cried."
'Letting the monsters in'
When it finally became time to announce the Palme d'Or for real, Lee said: "I apologise for messing up."
But then he almost fluffed the presentation again, starting to announce the winner rather than presenter Sharon Stone, by which point Ducournau was giggling in the audience.
She still broke into tears when the official announcement was made, and told the crowd: "This evening has been perfect because it's been imperfect.
"Thank you for letting the monsters in."
The only other woman to win the top prize is Jane Campion for "The Piano" in 1993.
Other winners on the night included Leos Carax as best director for "Annette", the flamboyant rock opera starring Adam Driver and Marion Cotillard, and written by eccentric Los Angeles pop duo Sparks.
The second-prize Grand Prix was shared between Iran's two-time Oscar winner Asghar Farhadi ("A Hero") and Finland's Juho Kuosmanen ("Compartment No.6"), while best screenplay went to Japan's Hamaguchi Ryusuke and Takamasa Oe for "Drive My Car".
The race had been wide open this year, with critics pointing to many possible successors to "Parasite", the South Korean hit which took home the last Palme in 2019 before making history by triumphing at the Oscars.
Last year's festival was cancelled because of the pandemic.
The jury members watched a lot of sex this year, from lesbian nuns in Paul Verhoeven's salacious "Benedetta" to a porn star returning to small-town Texas in "Red Rocket", which scored well with critics.
There were doubts early in the festival about the Covid logistics, with some festival-goers grossed out by the spit tests required every 48 hours, and criticism on social media over unmasked attendees in the cinemas at early premieres.
Restrictions were tightened, partying scaled back, and even though the stars couldn't quite keep themselves from hugs and kisses on the red carpet, the festival appeared to pass without a major outbreak.
But there was still plenty of star power.
Tilda Swinton was ubiquitous on the red carpet, appearing in five films of the official selection.
She starred in "Memoria" by Thailand's former Palme winner Apichatpong Weerasethakul, which shared the third-place jury prize with "Ahed's Knee" by Israel's Nadav Lapid.
But Swinton was clear that her proudest moment was receiving the Palm Dog award on behalf of her three spaniels, who appeared with her in "The Souvenir Part 2".
"Honestly, this is the prize to get," she said at Friday's canine ceremony, as she tied the red collar prize around her neck.