The 23-year-old lost his first two round-robin matches at the season-ending tournament to Roger Federer and Andy Murray.
"I am sad to announce that I have to withdraw from the rest of this competition, due to a low grade tear in my quad. It was a hard decision," Raonic said on Twitter.
"You, the fans deserve a great show, and I wouldn't step out if I couldn't. I am sorry for the fans. I will do everything to be here next year."
Raonic, the first Canadian singles player to qualify for the showpiece event, has been replaced by Ferrer and the Spaniard will play Japan's Kei Nishikori later on Thursday.
Image: Milos Raonic
Photograph: Julian Finney/Getty Images
Hopefully I can get through the group and keep going: Murray
Magnamimous Nishikori still smiling after breakthrough year
Old master Federer tames Nishikori at Tour Finals
ATP Tour Finals PHOTOS: Federer made to grind it out by Raonic
Federer gets double honour from childhood idol and coach Edberg