Florida missed a chance to tie Philadelphia for the NL wild-card lead.
"If Carpenter hadn't been out there, it might have been easier," Marlins manager Jack McKeon said. "He got in a couple of jams, and he got out of them. He was tough in the clutch. That's why he's a 19-game winner."
Carpenter (19-4) beat the Marlins for the second time in August and improved to 11-0 in his past 14 starts. He allowed seven hits but only one run in 7 2/3 innings, stranding four runners in scoring position.
"I had command of my sinker, command of my cutter and command of my breaking ball, and I was able to throw it when I wanted to throw it and keep them off-balance all night," Carpenter said.
He threw 94 pitches before manager Tony La Russa removed him with two outs and none on in the eighth.
"We're not going to push it," La Russa said. "That was enough for today, and we'll try to save a few bullets for the next time he pitches."
Carpenter will bid for his first 20-win season Saturday at Houston.
Jeff Conine drove in Florida's run with a sacrifice fly in the fourth, ending a streak of 24 consecutive scoreless innings pitched by the Cardinals.
Albert Pujols went 0-for-5 for St. Louis, but Eckstein hit an RBI single in the third and tripled home two runs in the fourth. Teammate Larry Walker hit his 12th homer over the center field wall leading off the third.
A.J. Burnett (12-8) lost his second start in a row after winning seven consecutive starts. He gave up a season-high six walks, and four led to runs -- including one to Carpenter, an .031 hitter.
Burnett threw 95 pitches in five innings and departed trailing 6-1. He left the stadium without talking to the media.
"Too many bases on balls are going to hurt you," McKeon said. "He wasn't on his game."
McKeon saved most of his annoyance for first base umpire Ted Barrett, who ejected Paul Lo Duca for arguing from the dugout after grounding out in the ninth.
"He was looking for trouble," McKeon said of Barrett. "What is this game turning out to be? It used to be you could argue and have some fun. Today you can't say a word. We've got to sit in the dugout with our Sunday school Bibles."
Barrett said Lo Duca's complaining was excessive. It was directed mostly at plate umpire Rick Reed.
"Lo Duca said something to me, but my back was turned," Reed said. "I turned around, and he shut up. I turned around again, and he started up again."
St. Louis left the bases loaded in the first when John Mabry
tapped out, but the Cardinals scored off Burnett in the second. Yadier Molina walked, advanced on a sacrifice and came home on Eckstein's two-out single to give Carpenter the lead.
"That could come down to a 1-0 game with those guys on the mound," Eckstein said. "So it was very key for us to go out there and get some runs early."
Burnett struck out the first two batters in the fourth before walking Abraham Nunez and Carpenter. Eckstein pushed the next pitch into the right-field corner for a triple and then scored when Miguel Cabrera -- who last week moved from left field to third base -- failed to handle Walker's grounder for an error.
Burnett walked the first two batters in the fifth, and Molina singled home a run.
Carlos Delgado and Cabrera are the only Marlins to homer since Aug. 5. ... The Cardinals have won 12 of their past 18 road games. They improved their all-time record in Miami to 29-21. ...
Florida's Mike Lowell singled in the seventh to improve to 3-for-4 this year as a pinch-hitter. ... Cardinals closer Jason Isringhausen, working for the first time since Thursday, needed 26 pitches to retire Florida in the ninth.