The second seed came from 5-2 down to win the opener on a tie-break, only to miss two match points in the second as the Frenchman levelled at a set apiece.
A break in the first game of the final set proved crucial, though, as Federer battled past the home favourite to record a 7-6(5) 6(5)-7 6-4 victory.
The Swiss maestro secured consecutive breaks to overturn a three-game first-set deficit before Chardy showed his steel to immediately break back and force a breaker which Federer won 7-5.
The second set was full of closely-contested games, but went with serve throughout as Chardy twice kept the match alive in the 10th game, and took the tie-break by the same scoreline which Federer won the first.
Despite the Paris crowd being behind him, the world number 30 could not take his momentum into the decider as Federer replied strongly to break in game one of the third set, at the fourth attempt.
Chardy refused to roll over as he denied the 17-time Grand Slam champion a second break in game five, but Federer would not give the Frenchman a way back in and closed out victory in two hours and 32 minutes.