It was the first time since 2005 that Denmark -- three-time finalists but never world champions -- have been dumped out of the competition before the quarter-finals.
Denmark's star player Mikkel Hansen, who scored eight goals in the match, said the Danes were simply “not good enough”.
“We played too slow at the outset and they scored some counter goals. Then we got into the game but started the second half like crap. We still managed a lot of good chances but wasted a lot of them,” he told the press after the surprise loss.
“It was a long and hard game but it is obviously inexcusable that we can't beat a team like Hungary,” Hansen added.
Hungary will now face Norway on Tuesday for a place in the semi-finals.