World number two Nadal, the highest seed left in the draw after the early ouster of No. 1 Novak Djokovic, dominated both tiebreakers to beat the towering Russian 7-6 (7/2), 7-6 (7/2).
He booked a 39th career meeting with Federer, a five-time champion at Indian Wells who breezed past 67th-ranked Hubert Hurkacz of Poland 6-4, 6-4.
"Hopefully I will be ready for it," said Nadal, who recovered an early break in the opening set and powered through the tiebreaker, but called for the trainer to have supportive tape applied below his right knee three games into the second.
Although he wasn't moving as well, Nadal gained the first break of the second set to lead 3-2, but was immediately broken himself.
He saved a set point in a fierce 10th game that went to deuce three times before Nadal held to make it 5-5. He couldn't convert a break chance in the 11th game as they went to another tiebreaker which the Spaniard again controlled.
"I just had to give my best and that's what I did," said Nadal, who has battled tendinitis in his knees throughout his career. "I'm very happy to be in the semi-finals."
Khachanov, who peppered Nadal with 17 aces in the two-hour, 17-minute match, has now lost all six of his career meetings with the Spaniard.
He'll be gunning for a chance to claim a fourth Indian Wells title while Federer is seeking to break out of a tie with Djokovic with a record sixth.
Nadal leads the head-to-head rivalry with Federer 23-15, but Federer has won 11 of their 20 hard-court meetings, including their last five.
However, they haven't met since October of 2017, when Federer triumphed in straight sets in the final of the Shanghai Masters.
- Extra energy -
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.
"If I play Rafa there's extra energy in the building -- there's always a lot on the line," said Federer, who added that so much time has passed since their last meeting that his own current five-match winning streak is of little significance.
"I don't think those five matches matter that much, to be honest," he said. "A lot of time has gone by.
Federer, a 20-time Grand Slam champion who captured his 100th career title at Dubai last month, overcame breezy conditions on stadium court and a hungry Hurkacz -- a 22-year-old ranked 67th in the world who was playing in his first Masters 1000 quarter-final and just the second quarter-final of his career.
Hurkacz settled his early nerves to produce some entertaining rallies, but he couldn't make a dent in Federer's serve.
One break in each set was all Federer needed to seal the win after an hour and 14 minutes.
"Overall I'm very pleased with that performance," said Federer, who has reached the final four without dropping a set, winning 38 of his 39 service games.
"I feel good," he said. "I'm holding my serve comfortably, I'm in a good place mentally when I go into my service games. I think it showed this week thus far, so I hope I can keep that up."