The knee had begun to bother Nadal in the second set of his 7-6 (2) 7-6 (2) victory over Karen Khachanov in the quarter-finals on Friday.
Federer, who is looking to follow up his 100th title in Dubai last month, had a more comfortable outing in ending the run of young Pole Hubert Hurkacz 6-4 6-4.
He soldiered through to what would have been a 39th career meeting with Federer, but said he knew when he practiced Saturday morning that he wouldn't be able to play to an adequate standard.
Nadal, who said he hoped and expected to be fit for a semi-final showdown with old foe Roger Federer on Saturday, wanted to be careful when asked if he thought playing on hard courts contributed to his history of injury. Federer has won each of the last five meetings, but Nadal holds a 23-15 lifetime head-to-head edge.
"The way we go about it is very different, yet we both find a way to excel", Federer said.
The Swiss great has won the last five in the series, but says that's of little significance now that it has been nearly a year and a half since their last meeting in the Shanghai Masters final in October 2017.
"It's not about only during the tennis careers that I am anxious", he said.
Federer has not claimed a Masters title since his Shanghai success over Nadal and the fourth seed has lost just once this season - his fourth round defeat to Stefanos Tsitsipas at the Australian Open.
Federer said he might not feel quite the same tingle of anticipation as fans at the prospect of facing Nadal, but he acknowledged that their clashes always raise the stakes. "Of course my goal and my idea is to be ready for tomorrow", Nadal said.
"But at the same time, in the other hand, I went through fantastic moments and still going with that feeling a lot of times".