The 37-year-old Swiss beat his compatriot Stan Wawrinka 7-6 (7/4), 4-6, 7-6 (7/5), 6-4 to reach his 43rd major semi-final and eighth at Roland Garros.
Defending champion Nadal, bidding for a 12th title at the French Open, blitzed a weary Kei Nishikori 6-1, 6-1, 6-3.
Federer trails his head-to-head record with Nadal 23-15 — despite winning their last five matches — and 13-2 on clay.
The Spaniard has a 5-0 stranglehold over Federer at Roland Garros with Nadal winning their most recent Paris clash in the 2011 final.
“The complete dream would be to win the tournament,” said Federer. “Other players won’t agree. It will be difficult, but I believe it anyway.
“It was hard, really, really hard. Stan played a really good match, I’m really happy to play him here at Roland Garros.”
The 20-time Grand Slam champion is the oldest man to make the semis at one of the big four tournaments since Jimmy Connors at the 1991 US Open aged 39.