Karim Benzema, who lifted the Champions League trophy with Real Madrid at the same venue last Saturday, looked like he was headed for another stellar night as he had an early shot smothered and then a goal ruled out for offside.
- ESPN+ viewers' guide: LaLiga, Bundesliga, MLS, FA Cup, more
- Don't have ESPN? Get instant access
His strike partner Kylian Mbappe departed at halftime after picking up an injury but Benzema was undeterred, cutting in from the right and playing a one-two with Christopher Nkunku before dribbling past another couple of Danish defenders and firing home in the 51st minute.
The world champions had Denmark under enormous pressure for most of the second half but they levelled through substitute Cornelius when he deftly volleyed home a pass from Pierre Hojbjerg in the 68th minute.
The goal did little to stop the relentless waves of French attacks and N'golo Kante should have put the home side back into the lead in the 81st minute, but his curling shot smacked off the right-hand post with Kasper Schmeichel stranded.
Denmark remained a danger on the break, with playmaker Christian Eriksen somehow firing his shot straight at Hugo Lloris with the goal at his mercy in the 86th minute, but Cornelius came to the rescue two minutes later.
The 29-year-old beat the offside trap to latch on to Joakim Maehle's long pass and blasted the ball high into the net past Lloris for the winner.
"It was better than even I expected. Fantastic, in front of 80,000 people, we go over and beat the world's best team," a delighted Cornelius told Danish broadcaster TV2.
"We have a strong team and have good players everywhere. We have lots of players who can come in from the bench and keep the level up. We are a small country, but we can play with the best," he added.
"It was a match between two good teams. There were some less good passages [of play] but also good passages. There are areas we will have an opportunity to work on in training," said France's stand-in coach Guy Stephan, who was deputising for Didier Deschamps following his father's death.