The 0-0 stalemate finished with the same scoreline as England and Slovenia’s parallel group match, with England emerging group winners.
With Denmark and Slovenia both finishing on the same points total and goal tally, second-place - and a meeting with hosts Germany - was decided on the basis of European qualifiers ranking.
While Denmark face Germany in Dortmund, England will return to Gelsenkirchen for a meeting with a third-placed side.
Slovenia will take on a group winner while Serbia were eliminated as last in the group.
Luka Jovic’s stoppage-time equalizer against Slovenia at this venue on Thursday had kept Serbian hopes alive of reaching the last-16 in their first Euros as an independent nation.
Having never beaten Denmark, Serbia coach Dragan Stojkovic backed his charges to "change history" against the 1992 Euros champions.
The Danes, semifinalists at this competition in 2021, knew a draw would be enough to qualify but needed a win while hoping for an England loss to avoid meeting hosts Germany in the last 16.
Despite Stojkovic’s side needing a win to progress, the Danes were more willing to attack early, with the Serbs rarely venturing into Danish territory.
Denmark caught the Serbian defense napping early, Christian Eriksen’s free-kick finding Jonas Wind alone in the box, but the forward shot directly at goalkeeper Predrag Rajkovic on the turn.
The Danes’ best phase came after 20 minutes, Eriksen forcing a fingertip save from Rajkovic and then pinning Serbia back with a series of corners.
Eriksen and Wind combined again from a corner to have the ball in the net on the 27-minute mark, but the midfielder’s direct cross had drifted out.
Jovic, brought from the bench at half-time, immediately posed questions of the Danish defense, pressuring Joachim Andersen into an own goal eight minutes in but the flag went up again for offside.
VAR confirmed Jovic, Serbia’s late hero against Slovenia, was inches offside.
Eriksen, Denmark’s most dangerous creative outlet, laid on an inch-perfect cross for Jannik Vestergaard after 65 minutes but the Leicester City defender’s header was gobbled up by a thankful Rajkovic.
Stojkovic went all out in the hope of a winner, bringing Juventus striker Dusan Vlahovic on alongside forward Jovic and Aleksandar Mitrovic, but the Serbs were unable to break through.