The Paris St Germain forward scored his first goal in Russia to give Didier Deschamps’ side victory at the Central Stadium in Yekaterinburg.
Pedro Aquino hit the post for lively Peru, who are still waiting for their first World Cup win since 1978, and the South American side can no longer qualify from Group C.
France are top of the group, two points ahead of Denmark and five in front of third-placed Australia, so they will now progress.
They face Denmark in their final game to determine who will top the group, while the Danes need only a point to progress.
But France were run close by Peru who dominated possession for long spells without seriously testing Hugo Lloris.
Peru made a quick start, putting the 1998 champions under pressure, and Lloris – on his 100th appearance for France – was almost embarrassed when Yoshimar Yotun’s lob from the halfway line dropped over the crossbar.
Peru’s tempo and pressing left France on edge but Antoine Griezmann did seize on a ricochet yet sliced well wide after 11 minutes. Paul Pogba then had Pedro Gallese scrambling when his 25-yard effort bounced just wide and Griezmann combined with Olivier Giroud but his sharp volley was blocked by the Peru goalkeeper.
France had found their footing but Peru wasted the best opening of the game through Paolo Guerrero in the 31st minute. The country’s 35-goal record scorer went past Samuel Umtiti but could only drive at Lloris with only the keeper to beat.
It was a miss Peru were left to rue when Mbappe won the game three minutes later when Giroud’s effort looped over Gallese and into the forward’s path for an easy tap-in to become his country’s youngest ever world Cup goalscorer.
That rocked Peru and Lucas Hernandez forced Gallese into a smart stop before scuffing his follow-up as France threatened to put the game out of sight.
Aquino almost equalised five minutes after the interval when he received the ball 30 yards out and his swerving drive clattered off the top of the post.
It was a warning for France as Peru began the second half as they had started the first, playing with a high tempo and forcing their rivals back. Jefferson Farfan hit the side netting with 17 minutes left, but Ricardo Gareca’s side began to run out of time to save their World Cup dream. They continued to press and, while Guerrero’s free-kick tested Lloris with three minutes left, Peru failed to find an equaliser.