The Danes took a lead in the second minute against the Brazilians before losing 3-2 to the four-time World Cup champions. Rivaldo scored twice and Ronaldo set up two of the goals.
In marked contrast to the five-goal thriller at Nantes, host France squeezed into the semifinal when it edged Italy 4-3 on penalties after a goal-less draw at the Stade de France outside Paris.
Martin Jorgensen's early goal for the Danes at La Beaujoire stadium on a pass from Brian Laudrup stung the champions, who then hit back with first half strikes by Bebeto and Rivaldo, both set up by passes from Ronaldo.
A blunder by Roberto Carlos, who whiffed on an acrobatic overhead kick in front of his own goal, led to Laudrup's tying score early in the second half. But Rivaldo scored on a 25-yard drive in the 61st to clinch the victory.
The Danes could have tied it again but Laudrup shot wide from close range and Marc Rieper's header hit the crossbar two minutes from the end.
After 120 minutes of error-filled play that had few goal chances, France and Italy went into a penalty shootout and the score was 3-3 before defender Laurent Blanc stepped up for the French.
Blanc, whose extra-time goal against Paraguay put France into the quarterfinals against the Italians, fired the ball past Italian keeper Gianluca Pagliuca to give his team the edge.
Luigi Di Biagio was next up for Italy and the shaven-headed midfielder, who has had a standout tournament, hit the crossbar.
As the French players celebrated, Di Biagio was distraught as his colleagues tried to console him.
It was the third time in a row the Italians had lost in the World Cup on a penalty shootout. The last time was the 1994 final against Brazil, losing 3-2 in a shootout when Roberto Baggio fired over the bar. That also was after a 0-0 draw.
In 1990 Argentina edged the Italians 4-3 on penalties in the semifinal after a 1-1 tie.
"It's a sort of a curse," Italy's coach, Cesare Maldini, said.
"We're walking out of this stadium with our heads up. It's a pity because it really is a lottery when you go to a shootout.
"I can't fault any of my players, they gave it all," the Italian coach said. "The team played really well."
Despite the fact that his team has scraped through its last two games with narrow victories, French coach Aime Jacquet believes it is capable of winning the World Cup.
"We have the players and the spirit now to go all the way and take the title," he said.
"It was a very difficult match. But we managed to stick to our game plan and France really deserved to win. We kept our nerve in the penalty shoot-out."
The other two quarterfinals are Saturday, with Argentina facing the Netherlands at Marseille and Brazil meeting the winner in the semifinal, and Germany meeting Croatia at Lyon to decide who faces the French.
Argentina coach Daniel Passarella is considering changes to his lineup after the team scrambled into the last eight on the back of a penalty shootout victory over England.
Defender Roberto Sensini is expected to be back anyway after missing two games due to injury, but Passarella may change his front line, possibly starting forward Abel Balbo as Gabriel Batistuta's partner instead of Claudio Lopez.
"The Netherlands is a great team, with players with tremendous technical skills," Argentina midfielder and team captain Diego Simeone said. "We will try to take the midfield from them, it's there because where they are especially strong."
German coach Berti Vogts is celebrating his 100th game in charge and his players want to give him the ideal present of a place in the semifinals.
"I really want to win this game, not because it's my 100th, but because
my team deserves it," Vogts said. They have worked so hard."