Eight-time champion Federer recovered from losing the opening set to defeat Japan's Kei Nishikori 4-6, 6-1, 6-4, 6-4 and book his place in the semi-finals of a Grand Slam for the 45th time.
The 37-year-old is also the oldest man to make the last-four of a major since Jimmy Connors at the 1991 US Open.
Federer will now face Nadal at Wimbledon for the first time since their epic 2008 final should the two-time champion Spaniard defeat Sam Querrey in his quarter-final.