Miller (13-9) held the Brewers to five hits and two walks and struck out four in 6 2/3 innings and helped keep the Cards atop the NL Central standings by one game over Pittsburgh.
Milwaukee's Wily Peralta (9-15) took the loss despite a solid outing. Peralta had a no-hitter going until Matt Holiday homered in the sixth inning. Peralta allowed three runs on two hits and fanned seven in 6 2/3 innings.
Holiday's 19th homer broke a scoreless tie. The Cardinals added single runs in the seventh and eighth innings. Milwaukee did not score until Logan Schafer cracked a two-run pinch-hit homer in the top of the ninth.
'SNL': 'Anchorman 2' cast, One Direction sing 'Afternoon Delight' [VIDEO]
Exploding whale video goes viral on Internet