Freddie Freeman homered for the NL East-leading Braves, who totaled five runs while dropping three in a row for the first time since July 3-5. Julio Teheran (10-7) allowed a season-worst five walks and was charged with four runs.
Miller (12-8) worked more than six innings for the first time in 13 starts since June 1.
He struck out six without walking a batter while pitching with no more than a one-run cushion against a fellow 22-year-old right-hander. Center fielder Jon Jay made a leaping catch at the wall to rob Brian McCann of at least extra bases in the seventh.
The Cardinals, who began the night a game back in the NL Central, go for a four-game sweep today.
St. Louis totaled three runs while getting swept in a three-game series in Atlanta in late July.
Pinch-hitter Shane Robinson and Carpenter opened a three-run seventh with singles to chase Teheran and the Cardinals broke it open against reliever Dave Carpenter with a two-run double by Matt Holliday and an RBI single by Yadier Molina for a 5-1 lead.
The Braves had three of their seven hits in the ninth, including pinch-hitter Gerald Laird’s RBI double off Seth Maness before Edward Mujica struck out Elliott Johnson with two on for his 34th save in 36 chances.
The Cardinals have hit 21 homers in August after totaling nine in July.
The first three hits of the game were home runs. Miller struck out the first two batters on seven pitches and the Braves’ first contact came when Freeman hammered a 1-2 pitch for his 16th homer.
Carpenter answered with his second career leadoff homer and 10th overall, also on a 1-2 count, in the bottom of the first. Beltran’s team-leading 23rd put the Cardinals ahead 2-1 in the third and he finished with three hits, two RBIs and his second base-running gaffe of the series.
Beltran settled for a single in the fifth after standing at the plate for several seconds and belatedly jogging to first on a liner down the third base line that caromed off the jut in the stands in shallow left. Two days earlier he missed third base and had to double back before scoring.