Manuel Pellegrini sent out a strong starting line-up, featuring record signing Sterling, with Yaya Toure, Sergio Aguero and new recruit, Fabian Delph, the only notable absentees.
But Stuttgart, who only just avoided relegation from the Bundesliga last season, found themselves 4-0 up inside 38 minutes at the Mercedes Benz Arena.
First Filip Kostic put them in front before Daniel Didavi scored a fine second and Daniel Ginczek added two more past a helpless Joe Hart in the City goal, to the delight of the 40,000 in attendance.
City improved after the break, however, with Sterling setting up Nigerian teenager Kelechi Iheanacho to get a goal back six minutes from time.
And Sterling was the provider again for substitute Edin Dzeko to make it 4-2 on what could be the Bosnian striker’s last appearance for the club, with a move to Roma imminent.
City, who had previously spent time in Australia and played a friendly in Vietnam this pre-season, begin their Premier League campaign against West Bromwich Albion next week at The Hawthorns on Monday Night Football.