The 37-year-old eased past Argentina's Leonardo Mayer 6-2, 6-3, 6-3, AFP reported.
"It's fabulous that I can spend this time in Paris," said Federer who last played the tournament in 2015 when he made the quarterfinals – where he lost to his compatriot Stan Wawrinka.
"I was prepared for the worst scenario, losing in the first round in three sets. But I am super happy with my performance.
Federer will be playing in his 54th quarterfinal at a Slam, cementing his place on top of the all-time men's list.
Federer, the 2009 champion in Paris, is the oldest man to make the quarterfinals of a Slam since Jimmy Connors at the 1991 US Open.
Federer didn't face a break point in the fourth round match against the outclassed world No. 68 played in a sweltering 32 degrees on Court Philippe Chatrier.