Messi missed a first-half penalty as Brazil beat Argentina 2-0 in a fiercely contested "Superclasico" in front of 50,000 fans in the Chinese capital.
Seven hours later, Ronaldo's Portugal lost 2-1 to France in Paris.
At Beijing's Olympic Stadium, journeyman Diego Tardelli was the unlikely hero with his first two goals for Brazil.
Atletico Mineiro striker Tardelli, 29, put Brazil ahead on 28 minutes, before Messi curled his soft penalty attempt close to goalkeeper Jefferson just before half-time.
More From This Section
"Brazil are the best team in the world with a great tradition," beamed coach Dunga, who is rebuilding following the 7-1 World Cup semi-final defeat to Germany.
"We have no big players, we are now acting as one team. The whole team is evolving, including me."
Barcelona icon Messi has now missed two successive penalties -- two weeks after he also miscued one for his club against Levante.
"We always try to win but today we couldn't. It was a match defined by our two mistakes," said Messi.
At the Stade de France in Paris, Karim Benzema scored an early goal and set up Paul Pogba's winner as France beat Portugal.