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.
Federer was warming up on another court at the same time as Nadal and figured the match was on.
However, the world No.2 soon texted the Swiss it wasn't going to happen.
"It is not about only today", Nadal said in an emotional press conference after announcing his decision.
"It's a big letdown", said Federer, who came on court in khaki shorts and a grey cardigan to address fans.
Nadal isn't sure how severe the injury but has no doubt that he'll be ready for the Monte-Carlo Masters, beginning April 13.
Fourth-seeded Federer received a walkover into the decider as Nadal pulled out shortly before their eagerly-awaited semi-final.
Nadal beat Karen Khachanov 7-6 (7-2), 7-6 (7-2) on Friday night in the Californian desert but was clearly struggling with knee pain in the second set.
Mike Thalassitis: Former Love Island star dies aged 26
He penned: 'Absolutely lost for words not only made a friend in the villa but made a mate for life on the outside to! Chris Hughes took to Twitter on Saturday night to lead the tributes to his former Love Island co-star.
"I am obviously excited to be in the finals, but not this way".
He appeared to be on the verge of tears on Saturday as he spoke to the media.
Neither Thiem nor Raonic could carve out many openings on the other's serve in the first set, though it was the former who opened up a 4-1 lead in the breaker to take the opener.
He admitted that he sometimes is sad because he feels at a disadvantage against his opponents due to his continued knee issues that force him to limit his practice and playing time before he gathered himself. They've faced each other only four times, most recently at the ATP Finals in November, which Federer won, and three times in 2016.
"It's not the moment to complain much".
The 32-year-old was playing only his second event since reaching the final of the Australian Open; he lost to Nick Kyrgios in the last 16 of the Mexican Open.
While Federer floated into Sunday's Indian Wells men's final (ESPN2, following women's final at 4 p.m. ET) without dropping a set all tournament, his two greatest rivals sputtered.