Sylvain Ripoll's France, chasing a first Olympic medal since winning gold in 1984, collapsed in the second half when Alexis Vega, Sebastian Cordova, Uriel Antuna and Erick Aguirre found the net for Mexico at the Tokyo Stadium.
France now face a daunting task to qualify from Group A with a top-two finish, ahead of games against South Africa on Sunday and hosts Japan.
"The first thing we now have to do is digest this disappointment," Ripoll said. "We only have two days. There's no time to waste."
In their first Olympic campaign since Beijing 2008, Australia took a surprise lead against twice gold medallists Argentina inside 14 minutes when winger Lachlan Wales scored from close range.
Argentina's problems were compounded late in the first half when left back Francisco Ortega was sent off after two quickfire yellow cards -- the second for a tug on Australia's Riley McGree.
The South American side never quite recovered from the setback, as substitute Marco Tilio added a second for the Olyroos in the 80th minute to seal a memorable win.
Spain, the last European men's team to claim gold in 1992, also stuttered in their opening match as they dominated possession but created few opportunities in a goalless stalemate with Egypt in Sapporo.
Along with Euro 2020 young player of tournament Pedri, Spain had five other players who featured in the senior team's run to the semi-finals this month.
They came closest to scoring when Dani Ceballos hit the post on the half-hour mark before the Real Madrid playmaker joined full back Oscar Mingueza on the sidelines due to injuries at the end of first half.
Unlike the women's tournament featuring all the senior players, the men's teams are usually restricted to Under-23 sides, with three over-age players allowed per team.
With the Games pushed back by a year due to the COVID-19 pandemic, the age limit was tweaked to Under-24.
Elsewhere in Group D, Franck Kessie scored the winner to earn Ivory Coast a 2-1 win over Saudi Arabia in a heated game in Yokohama, the sides committing 27 fouls between them.
The African nation were reduced to 10 men when substitute Aboubacar Doumbia was shown a straight red for his involvement in a scuffle during the closing stages.
In Group B, Burnley striker Chris Wood fired a late goal to help New Zealand beat South Korea 1-0 in Kashima - earning the Pacific island nation their first win in Olympic men's soccer.