After a slow start, Les Bleus threatened with Karim Benzema – who saw a shot blocked.
Kylian Mbappe then fed Benzema who slotted home, but the goal was correctly ruled out for offside following a VAR call.
The French dominated possession in the early stages – bossing 62 per cent of the ball in the opening 25 minutes – but found Denmark stubborn opposition.
And when Mbappe did find a way through on 31 minutes, he was thwarted by Kasper Schmeichel who quickly came out to save.
Just before the break, France lost the PSG forward through an innocuous injury.
Christopher Nkunku replaced Mbappe after the break, and France began the second half more threatening.
Schmeichel again was the hero – keeping out Benzema with another super save in the 48th minute.
The Danes resistance was broken in the 51st minute when Nkunku and Benzema combined brilliantly in the box, for the Real Madrid star to waltz past the opposition defence before sliding the ball home.
After the goal, France piled forward and continued to dominate possession. However, a second goal continued to allude them.
And they lost Man Utd defender Raphael Varane to injury in the 62nd minute – who was replaced by Arsenal outcast William Saliba.
That seemed to spur Denmark on – and 20 minutes from the end sub Andreas Cornelius volleyed them level.
The goal made for a frantic ending to the game – with both sides looking to win it.
Christian Eriksen looked capable of creating something out of nothing for the visitors.
While Nkunku gave France a different attacking dimension in the second half.
In the 82nd minute the RB Leipzig sensation thought he’d won the game, only to see his shot go inches wide of the post.
Then he forced Schmeichel into a save two minutes later – with the Danes unable to handle the Man Utd target.
Astonishingly, though, it was Denmark who would go on to win it.
In the 89th minute Cornelius raced clear and slotted calmly passed Lloris – with VAR ruling the goal was onside.
It was the least Denmark deserved for hanging in there and making a game of it against their illustrious opponents.
For Didier Deschamps, though, he will be wondering how his side failed to score more goals given they dominated the ball throughout.