Nadal suffered the problem during Friday's straight-sets win over Karen Khachanov in the last eight. He had his knee taped but played on in a match that required winning both sets on tiebreaks, 7-6(2), 7-6(2).
Federer will now await the winner of Dominic Thiem's meeting with Milos Raonic later Saturday. The 37-year-old will now be considered the favourite to win this title for a sixth time.
It would be a record haul, with Federer currently level on Novak Djokovic on five wins.
Nadal would have fancied his chances of denying Federer history ahead of schedule. However, the Spaniard didn't feel confident his knee would hold up:
His decision is a prudent one, but it has denied fans the chance to witness the 39th meeting between these two storied rivals. They have produced some of the most memorable matches in tennis history, including the epic 2008 Wimbledon final, as well as the signature match to decide the outcome of the Australian Open two years ago.
While Federer is still going strong, Nadal is beginning to look vulnerable as his body fails him.
Persistent injuries limited him to complete "just one hard-court tournament in 2018," per BBC Sport. The same source noted how Nadal retired during that year's Australian Open quarter-final and the last four of the U.S. Open.
One more setback must raise doubts about the ability of one of the sport's greatest-ever players to continue competing at its highest levels.