The Cardinals ended a seven-game home losing streak, their longest since Aug. 2-15, 1983. It was their first home win since a 6-3 victory over San Francisco on June 5.
Milwaukee has lost four of five and fell to 13-24 on the road, the second-worst road record in the National League behind the Cincinnati Reds.
Matt Garza (1-1) gave up seven runs, four earned, in 5 2/3 innings. He struck out six and walked four.
Garcia (6-6) allowed four hits. He struck out six and walked four.
Rookie Aledmys Diaz had two hits and reached base three times for the Cardinals. He missed the previous three games after fouling a pitch off the area around his right eye on Monday.