Catch-up on all the action leading up to the finals with highlights, mini matches and full replays now on the
Full-back Hernandez stretched high after five minutes to hook in the first goal Morocco have conceded to an opposition player in the tournament after a scramble in the box, but the holders offered only occasional glimpses of their class.
Morocco, disrupted by early injuries to two key defenders, recovered to cause no end of problems, with Jawad El Yamiq's overhead kick striking the post at the end of the first half and the outsiders pouring forward for much of the second.
However, they could not quite fashion a clear enough chance for the equaliser and were unable to extend the astonishing run that included victories over Belgium, Spain and Portugal and made them the first African team to make the semi-finals.
France settled it in the 79th minute when a brilliant dribble by Kylian Mbappe set up Kolo Muani to tuck in the decisive goal with his first touch less than a minute after coming on as a substitute.
France will be hugely relieved to become the first defending champions to reach successive finals since Brazil in 2002.
They can now look forward to Monday's (AEDT) showdown when they will bid to follow Brazil (1962) and Italy's (1938) footsteps and become the third team to retain the title.