Gallardo saw team physician Dr. William Raasch on Wednesday in Milwaukee, and manager Ron Roenicke says it's a mild strain. Roenicke says right-hander Tyler Thornburg will take Gallardo's spot in the rotation.
The hamstring injury forced Gallardo to leave the Brewers' 6-5 victory over the Cubs on Tuesday in the fifth inning.
Infielder Scooter Gennett, who served as the Brewers' 26th man during Tuesday's day-night doubleheader, was optioned to Triple-A Nashville, and then recalled to take Gallardo's spot on the roster.
Gennett is batting .217 with a homer and five RBIs in 18 games this season with Milwaukee.