Donovan was a 67th minute sub, replacing striker Luca Toni, who had scored in the 43rd minute and assisted on Franck Ribery's goal in the 16th minute. The score was 5-0 when Donovan entered.
Donovan, who is on loan to Bayern from the Los Angeles Galaxy through mid-March, nearly scored on his first touch, shooting narrowly wide. Four minutes later Donovan was denied by Stuttgart keeper Jens Lehmann.
Other Bayern scorers were Bastian Schweinsteiger (14th minute; 55th minute penalty kick) and Ze Roberto (59th).
Mario Gomez scored Stuttgart's consolation goal in the 84th minute.
A sellout crowd of 55,500 attended the game at Stuttgart's Mercedes-Benz-Arena.
Donovan had scored four goals in five friendlies during Bayern winter-break training. His first chance to see Bundesliga action comes on Friday when second-place Bayern travels to fourth-place Hamburg SV.