The former world No.1 was trailing Anett Kontaveit 6-0 2-0 when she was forced to retire with a right thigh issue. “I was feeling it a lot in the warm-up,” Kerber told the WTA website.
“It started a few days ago, but this morning, I was feeling it more and more. I was trying everything to go out there. I'm here in Stuttgart, my home tournament, so I was trying everything, thinking I could play for the fans.
“At the end, it was too much and I started to feel the pain a lot in the first two games, where maybe I was sliding a little bit differently.”
Garbine Muguruza also failed to complete her match on an injury-hit day in Germany. The Spaniard, citing a back problem, quit after conceding the first set 7-5 to Anastasia Pavlyuchenkova.
No.3 seed, Elina Svitolina, did manage to advance, however she was also helped by a retirement. Marketa Vondrousova felt unable to continue after five games of a deciding set.
In matches that were completed, Coco Vandeweghe took out defending champion, Laura Siegemund, 6-4 4-6 6-3 and Caroline Garcia squeezed beyond teenage sensation, Marta Kostyuk, 6-1 3-6 7-5.
Jelena Ostapenko, who dazzled on clay last year, thumped Zarina Diyas 6-3 6-0 while Karolina Pliskova dismissed Veronika Kudermetova 7-6(4) 6-3.
The Latvian and the Czech are scheduled to meet in the last eight on Friday.
At the Istanbul Open, Caroline Wozniacki squeezed beyond Sara Errani 5-7 6-3 6-3, Donna Vekic thrashed Ajla Tomljanovic 6-1 6-2 and Maria Sakkari skipped past Aleksandra Krunic 6-3 6-1.
Arantxa Rus and Polana Hercog are also through to the quarter-finals.