The last time France finished bottom was in 1999 when the tournament was still called the Five Nations.
Two Greig Laidlaw penalties in the first half were cancelled out by Frederic Michalak as France gained ascendancy in the second period.
Fofana’s try in the 67th minute gave France a seven-point advantage going into the final stages, before Medard’s try minutes later put the game beyond Scotland.
Tim Visser’s late try did put Scotland within distance of a draw, but France held on for their first win of the campaign. It was not enough though, as they finished bottom of the standings.
Laidlaw put Scotland ahead early on with two 40-yard penalties after some patient build-up play in midfield, despite the greasy conditions in Paris.
France soon got a hold of the game, but a 10-minute period of sustained pressure in front of Scotland’s line came to nothing, with the visitors’ withholding attempts from Mathieu Bastareaud and Fofana.
Scotland then regained control, with replacement Max Evans close to getting on the end of a chip over last man Medard just before half time.
But with the pitch in Paris tearing up even in the very early stages, neither side were able to show any strength in the scrum.
France came out in the second half looking more positive, and halved the deficit through Frederic Michalak’s penalty, minutes after the Frenchman had been involved in a heated scuffle with Stuart Hogg.
As the hosts came into the game more, Michalak again converted to level the scores with half an hour remaining after an offside penalty.
The French fly-half then put his side ahead for the first time, with Scotland’s solid defence from the first half looking exhausted under waves of French attacks.
Laidlaw brought Scotland level with 20 minutes remaining after Michalak ran up a blind channel, but replacement Vincent Debaty found himself in a two-on-one situation 10 metres from Scotland’s line, before opting to go alone where Vincent Clerc looked to be the better option for France.
But France finally made their dominance tell, with replacement Yannick Nyanga offloading to Fofana to outsmart Stuart Hogg score in the corner.
France then took a 14-point lead just minutes later, with the impressive Medard going over after strong work from outside centre Mathieu Bastareaud.
With five minutes remaining, Visser broke free with 30 metres to run after being offloaded by Matt Scott, putting the visitors within touching distance of levelling the match, but it was too little too late as the hosts held on.
A win for Scotland would have given them their highest points tally at a Six Nations Championship since 2006, while France finished with the wooden spoon for the first time in the Six Nations era.