Pujols and Ludwick reached base four times apiece. Pujols added two RBIs to reach 85 and also hit his first triple of the season.
Chris Carpenter (7-3) worked six innings, allowing seven hits and three runs with six strikeouts. The Cardinals' ace improved his career record against the Cubs to 9-3, including 6-2 at Wrigley Field.
The victory put the first-place Cardinals eight games over .500 and knocked the struggling Cubs 4 1/2 games out of the lead in the NL Central.
Leading off the fifth, Pujols drove a Rich Harden pitch into the basket just atop the center field wall to put the Cardinals up 4-3.
Harden (5-6) threw 101 pitches in five innings, giving up seven hits and four runs. Aaron Heilman relieved in the sixth and the Cardinals quickly added four more runs.
St. Louis loaded the bases on a single and two walks and Ludwick delivered a two-run single that put St. Louis up 6-3.
Rick Ankiel walked to reload the bases and the Cards got another run when Cubs' left fielder Alfonso Soriano couldn't hold Yadier Molina's shallow fly. No error was charged on the play because Soriano picked the ball up and was able to force Ankiel at second. Heilman then threw a wild pitch to allow the fourth run to cross.
Derrek Lee's three-run homer, an opposite-field drive to the right-field bleachers, followed singles by Harden and Ryan Theriot and tied the game for Chicago at 3 in the third. It was Lee's 17th homer of the season.
Ludwick had a sacrifice fly in the first and three singles for St. Louis.