Gonzalo Montiel rolled in the deciding penalty to give Argentina their third World Cup and prevent France from becoming the first team in 60 years to retain the trophy.
But a truly remarkable game saw Messi and Mbappe both live up to their billing, with Messi scoring twice and Mbappe becoming the first player since England’s Geoff Hurst in 1966 to net a World Cup final hat-trick in a game that ended 3-3 after extra time.
Messi had opened the scoring from the penalty spot midway through the first half before Angel Di Maria doubled Argentina’s lead at the end of a brilliant counter-attack in the 36th minute.
But the astonishing Mbappe breathed life into the holders as he pulled one back from the penalty spot with 10 minutes to go before equalising in stunning fashion just 60 seconds later to force extra time.
Messi then seemed to have decided the contest in Argentina’s favour once and for all when he converted a rebound in the 109th minute, only for Mbappe to net from another spot-kick, bringing the game level at 3-3 and forcing a shoot-out.
The third World Cup final penalty shoot-out started with Messi and Mbappe both scoring, but Kingsley Coman’s next kick for France was saved and Aurelien Tchouameni then crucially missed the target.
It is the second time in five World Cups that France have lost the final on penalties after they were beaten by Italy in 2006, and it is Argentina who are champions for the first time since 1986.
The win allows Messi, at 35, to complete his glorious career by emulating Diego Maradona, and this will be remembered as his tournament despite the best efforts of Mbappe, who finished as the tournament’s top scorer with eight goals, one more than his Paris Saint-Germain teammate Messi.
France’s quest for history had been threatened by a virus in the days leading up to the final and they appeared sluggish before Argentina went ahead.
France conceded a penalty for the fourth time this tournament when Di Maria was clipped by Ousmane Dembele, and Messi stepped up to score from the spot for the fourth time in Qatar, his 12th World Cup goal allowing him to equal Pele’s tally.
The expected response from the defending champions was not forthcoming and Argentina increased their lead in the 36th minute.
Messi and Julian Alvarez combined to release Alexis Mac Allister bursting through the middle, and he played a first-time ball to the back post for Di Maria to finish.
Having hardly featured in the knockout rounds due to injury, Di Maria had returned here and appeared tearful as he celebrated his goal, which was a World Cup final classic.
France had not even mustered a shot and Deschamps moved before the interval to replace Olivier Giroud and the struggling Dembele.
On came Randal Kolo Muani and Marcus Thuram, as Mbappe moved into the middle of the attack.
Argentina blow two-goal lead
Argentina had famously blown a two-goal lead before eventually emerging victorious in their last World Cup final triumph 36 years ago, but there appeared little prospect of a repeat of that scenario.
However, the French were suddenly given hope when they won a penalty 10 minutes from time as Kolo Muani was brought down by Nicolas Otamendi.
Mbappe smashed the spot-kick into the net and the watching French President Emmanuel Macron rose to his feet. France had hope, and within another minute they were level.
Messi was robbed of possession by Coman in the lead-up before Mbappe found Thuram and then met his partner’s knockdown with a stunning volley.
It will go down as one of the most dramatic moments in World Cup history, and the French players on the bench raced across the pitch to celebrate with their teammates.
Argentina, who lost the 2014 final in extra time, looked shattered, and yet it seemed again that they had won it when Messi followed up to score early in the second extra period after Lautaro Martinez’s shot was saved.
But France were again saved by Mbappe as he converted another penalty following a Montiel handball.
It was end to end, and Argentina needed a brilliant Martinez save from Kolo Muani to take it to penalties and Montiel’s kick proved decisive to spark wild Argentinian celebrations.