Striker Kasper Dolberg scored twice either side of the half time break and late goals from Joakim Mæhle and Martin Braithwaite wrapped up the result as Denmark looked the better side throughout.
Wales was limited to half chances by a stout Danish defense, with Gareth Bale coming closest early in the encounter, but his effort just went wide of the post. Harry Wilson received a red card late on for a cynical challenge.
With Danish fans permitted to travel to Amsterdam, the Johan Cruyff Arena was predominately made up of Denmark supporters.
After some passionate national anthems, the game started with fervor and pace, with both teams exchanging chances in the opening minutes.
Bale’s shot went whizzing past Kasper Schmeichel’s post but it was Denmark that broke the deadlock.
In the 27th minute, Dolberg received the ball, turned and ran at a static Welsh defense before firing past an outstretched Danny Ward.
The goal seemed to spur on Denmark, closing out the first half with heavy pressure chances. But it didn’t have to wait long to double the lead, with Dolberg capitalizing on a poor clearance from Neco Williams to score his second goal of the tournament.
Needing goals to get itself back in the game, Wales pushed forward, only to the benefit of Denmark.
Mæhle and Braithwaite scored from inside the area to make the result more emphatic and qualify Denmark for the quarterfinals.
Wales midfielder Wilson got a late red card for clipping the heels of a Danish attacker.
“We tried to play in the second half but made a mistake to concede which killed the momentum on our side. To finish how we did is disappointed but the boys are frustrated and angry understandably, I’d prefer us to go out that way.”
Denmark will face either Netherlands or Czech Republic in Baku, Azerbaijan, in the quarterfinals.