Miller (4-2) gave up seven hits and a walk in six innings while striking out five.
He was scoreless through the first five innings before allowing a sacrifice fly by Jonathan Lucroy. Carlos Martinez, Seth Maness and Fernando Salas held the Brewers without a run over the final three innings. Martinez and Maness made their major league debuts.
The Cardinals jumped in front in the third inning on a two-out, two-run home run by Holliday off Brewers starter Kyle Lohse (1-3). Allen Craig followed with a single but was thrown out at the plate attempting to score on a double by Yadier Molina, one of three Cardinals thrown out at the plate.
St. Louis extended its lead in the fifth on Jon Jay's two-run double. Beltran added a solo home run leading off the seventh for the Cardinals, who scored another run in the inning on a passed ball. Allen Craig was thrown out at the plate attempting to score on a single by Pete Kozma to end the inning.
Lohse pitched five innings, giving up 11 hits and four earned runs. He walked one and struck out three. His ERA climbed to 3.16 from 2.53.
Cardinals closer Jason Motte will have Tommy John surgery and miss the remainder of the season. . Ramirez was reinstated from the 15-day disabled list on Friday and started at third base. He singled in the second inning in his first at-bat since April 5. The Brewers optioned infielder/outfielder Josh Prince to Triple-A Nashville. . St. Louis purchased the contract of 21-year-old RHP Carlos Martinez from Double-A Springfield. He took the roster spot of Mitchell Boggs, who was optioned to Triple-A Memphis. Boggs, who set the Cardinals franchise record with 34 holds last season, was 0-2 with a 12.66 ERA in 14 appearances this season. The Cardinals also moved Rafael Furcal to the 60-day disabled list. . Brewers OF Carlos Gomez extended his hitting streak to 10 games with a second-inning single.