The Australian had been due to face Federer in Friday's first quarter-final after knocking out Novak Djokovic in the last 16 earlier this week.
But the world number 16 has been hit by a sudden illness, claiming he is "in no fit state to take to the court".
Federer will now meet the winner of the meeting between Jack Sock and Kei Nishikori for a place in Sunday's final.
"Unfortunately I am unable to play today due to sickness," Kyrgios said on Twitter. "At this stage we think it's food poisoning, and I'm praying it's nothing more.
"After a restless night of being sick I have nothing left and to play a great champion like Roger, I need to be at my best to have a chance.
"I don't take this decision lightly, these are the matches we train for but I'm in no fit state to take to the court. I'm sorry to the fans but I have to put my health first and I hope you understand.
"I want to wish Roger the best of luck for the rest of the tournament and thank everyone for their support so far here at the BNP Paribas Open. I will definitely be back. Thank you."