The Israel Premier Tech rider took third place on stage 12 atop L'Alpe d'Huez, which was his best performance since a career-threatening crash three years ago.
"A test has revealed that I have contracted COVID so I am not going to be taking the start today," Froome said in a video on Twitter just as stage 18 was beginning.
"I'm really disappointed not to be able to roll into Paris and finish off this Tour de France... I am going to head home now, switch off for a few days and refocus on being ready for Vuelta a Espana later this season."
Froome was 26th in the overall standings.
On stage 12, however, he was fighting for a first victory in more than 1,500 days, a position he was in for the first time since a freak crash left him with multiple fractures at the 2019 Criterium du Dauphine.
The 37-year-old had vowed to go on the attack on the Tour again, fuelled by a renewed motivation after losing faith last year.
"It's been a very special race for us as a team," Froome added.
Israel-Premier Tech have had a spectacular Tour de France, winning two stages through Australian Simon Clarke and Canadian Hugo Houle.
"It's been very special for me as well. I've been finding my legs and I want to thank everyone for the support through this process."