The world number five and recent Miami and Marbella champion was forced to retire after the first set against German player Julia Georges.
"I picked up a shoulder injury during Fed Cup and didn't play the last day there," said Azarenka. "I have been trying to rehab for the last few days, I came here and tried my best to play but unfortunately it just keeps getting worse and worse."
Azarenka will now return to Monaco for treatment and to recover in time for her next tournament.
Elsewhere in Stuttgart, last year's French Open runner-up Samantha Stosur of Australia advanced to the quarter-finals after a tough battle against Slovakia's Daniela Hantuchova, winning 6-4 2-6 6-4.
Stosur will now play second seed Vera Zvonareva for a place in the semi-0finals.
"We have played each other lots of times and we know each others' games pretty well," said Stosur.
"I have had good success against her in the past and I need to just remember what I did and do it again."
It was a good day for home players in Stuttgart on Wednesday with four players making it through to the quarter-finals.
Andrea Petkovic produced the day's upset by defeating former world number one Jelena Jankovic in three sets 3-6 6-1 6-3. She is joined by compatriots Sabine Lisiki, Julia Georges and Kristina Barrois.
World number one Caroline Wozniacki also advanced to the quarter-finals with a straight sets win over Zuzana Kucova 6-1 6-2.
























