Antoine Griezmann gave France the lead early in the match in Kazan from the penalty spot.
Angel di Maria levelled just before half time before Gabriel Mercado put the South Americans in front in the 48th minute.
That advantage lasted less than 10 minutes.
Benjamin Pavard, playing in only his ninth international, lashed home a volley, to equalise. The 22-year-old Stuttgart defender, compared with Lillian Thuram for his versatility in the rearguard, is the first France defender to score at the World Cup since Thuram bagged a brace in the semi-final against Croatia in 1998.
Before the geeks could digest that trivia, there was more fare.
Mbappé struck twice in four minutes to become the first teenager to score at least twice in a World Cup match since a 17-year-old Pele in 1958.
"I'm very happy to score the goals,” said 19-year-old Mbappé. “And it's flattering to be compared to a great player like Pele. But he's in another category. Still, it's great to join the list of players that have achieved such feats."
Didier Deschamps, who skippered France to their only World Cup triumph in 1998, praised his team's character to fight back from 2-1 down.
"We answered the call,” he said. “It was not easy as we were leading, then there was an equaliser, then we were 2-1 behind, but we kept fighting.
"There is an excellent mentality in this group and we did everything to go further. Since I am responsible for everything, particularly when it doesn't go well, I'm very proud."
France to face Uruguay
France will play Uruguay in the last eight after they beat Portugal 2-1 in Sochi.
Edinson Cavani struck either side of Pepe’s equaliser.
The concern for Uruguay ahead of the clash with France will be Cavani’s fitness.
The 31-year-old limped off late in the second half.
"As always, we will bank on the strength of our team as a collective," said Uruguay coach Oscar Tabarez. "That is our best chance against any adversary and we know that France will be very tough indeed.
"But we will look to impose our way of playing on them, using our strengths. We're here to play all seven matches, right up until the final."