Michael Wacha hit a two-run single and scored on Matt Carpenter's double in a four-run second to lift the Cardinals, who took a 5-4 lead in the season series.
Hammel did not record a quality start for the first time this season. The right-hander struck out the side to start the game, and he finished with six K's. He allowed five hits and walked two over 5 1/3 innings.
"It's the kiss of death to strike out the side in the first inning as a starting pitcher -- everybody knows that," Hammel said. "Today was the best physically I felt all year, and obviously, it's the way the game works, and it didn't work out. My fastball was up. It caught up with me in the second."
Wacha avenged a loss to the Cubs at Wrigley Field on May 3, giving up two runs on seven hits over seven innings.
The Cardinals loaded the bases with one out in the second inning on a double by Yadier Molina and walks to both Allen Craig and Peter Bourjos. Molina scored on Mark Ellis' groundout to second. Wacha then helped himself with a two-run single, and he scored on Matt Carpenter's double for a 4-0 lead. That prompted a visit from pitching coach Chris Bosio.
Wacha began the day 0-for-14 at the plate. He now has five career RBIs.
"I got behind him with two wild ones," Hammel said of the Cardinals pitcher. "You've got to attack. I was aggressive, but I wasn't quality aggressive today, and that's where I have to make my adjustments."
Hammel felt good on the mound, but just missed with his pitches at the wrong time.
"I was confident with what I was doing and had a good game plan," Hammel said. "It was good for three of the five [innings] I was out there, and other two was a little bit of a labor."
Hammel needed 33 pitches to get through the second, but he was able to find his rhythm and retired 10 in a row.
"He wants you to swing at his pitch, kind of nibbles the zone," Carpenter said of Hammel. "We did a good job of making him work his pitch count up. We were able to get the big knock, and that's been the big difference, really, with the season so far, getting guys on and being able to get them in."
The Cubs know that feeling.
Rizzo bunted for a single for the second time in the game leading off the fourth, beating the Cardinals' defensive shift. Castro followed with his sixth home run to pull the Cubs within, 4-2. The shortstop now has four homers and 11 RBIs in 18 games since moving to the No. 4 spot in the lineup.
"I like it there," Castro said of his role as the cleanup man. "I feel pretty good there. I like hitting with men in scoring position. [Renteria] put me there for a reason."
And Castro would bunt, too, if needed. Rizzo now has three career bunt singles.
"It's something he's seen as a mode of maybe offsetting [the shift]," Renteria said. "He's looking at the game from a lot of different angles. Think about it -- you're down four runs, and a solo home run isn't going to do a whole lot for you. Why not?"
It's one way to get teams to stop employing the extreme defensive adjustments against the left-handed-hitting first baseman.
"Everyone wants to play these shifts, and I have Starlin Castro hitting behind me," Rizzo said. "If they're going to give me that, I might as well take it.
"I almost made them pay twice for it. Whenever you can get a baserunner ... Wacha's a great pitcher and you want to get him in the stretch and try to maybe throw him off a little bit. If teams are going to give me that, I'll take it all the time."
Rizzo hasn't been practicing his bunting except for two token bunts before every batting-practice session.
"It's something that if it's there, it's there," Rizzo said. "We're down four and they gave it to me again, so why not take it? We got something going at least."
The Cardinals added a run in the sixth when Matt Holliday doubled and scored one out later on Molina's single, which chased Hammel.
The Cubs loaded the bases with one out in the eighth against Kevin Siegrist, and they tallied a run on Junior Lake's sacrifice fly against Trevor Rosenthal.
With the loss, Chicago dropped to 13-26, matching its slowest start through 39 games since 2002.
"You've got to look at the positive," Hammel said. "We've played a lot of good ballgames. We're not getting blown out. It's not ugly games. It's one or two pitches here or there, or one or two timely hits that we haven't gotten. It's not like we're just laying down. It's obviously frustrating, but I think we've played pretty good ball."