Antoine Griezmann coolly converted the 13th minute penalty. But Mbappe’s PSG teammate Angel Di Maria levelled with a 41st minute long-range stunner and the South Americans were back in what was proving a superb match.
Argentina took a 2-1 lead minutes after the restart when Gabriel Mercado clipped Messi’s low curling shot past Hugo Lloris, but that was Messi’s only real contribution in the match.
Defender Benjamin Pavard’s stunning half-volley levelled for France on 57 minutes and as Argentina lost hope, Mbappe struck in the 64th and 68th minute to seal France’s place in the last eight.
The last time France lost a World Cup game after taking the lead was in 1982, against Poland.
Argentine had calls for first-half penalties too when the ball skimmed Samuel Umtiti’s arm, then when Messi tumbled as he was played into the area, were waved away.
France had looked in control, but the stakes changed dramatically minutes before the interval.
Cristian Pavon, on the left flank, found Di Maria unmarked 25 yards out from goal and he unleashed a thunderbolt that flew past a diving Lloris and into the top right-hand corner.
Di Maria, one of several Albiceleste players criticised for underperfoming in their group games, made amends by setting up Argentina’s second.
He twisted and turned on the left side of the area to win a free kick, after Pavard’s tug, and when Banega’s free kick was cleared by Pogba it fell to Messi.
His curled shot looked innocuous, but Mercado stuck a foot out to wrong-footed Lloris.
Minutes later, Les Bleus were level, Pavard matching Di Maria’s effort with a superbly-struck half-volley with the outside of his right boot that spun past Argentina ‘keeper Franco Armani after Blaise Matuidi’s wayward cross found the Stuttgart defender.
Despite a late consolation for Argentinan when Sergio Aguero headed Messi’s superb long cross past Lloris in stoppage time, Mbappe had already well and truly stolen the show.
When Matuidi’s shot was blocked just after the hour, Mbappe was on hand to restore France’s lead with a low shot past Armani.
Four minutes later the teenager ran on to Olivier Giroud’s perfect pass on a France counter to drive it low past Armani and spark mass celebrations on the French bench.