Geovany Soto led off the 10th with a single off Dotel (0-2), advanced to second on Marlon Byrd's sacrifice bunt, and scored on Colvin's hit to center field just hours after the Cubs fired general manager Jim Hendry.
Soto also had a game-tying RBI double in the eighth inning. Darwin Barney homered and tripled, and Starlin Castro added two hits for the Cubs. Sean Marshall (6-5) pitched a perfect 10th to earn the win.
Castro, who leads the NL with 162 hits, has 301 in his career. He is the fifth Cubs player to pass 300 in his first two seasons.
Chicago beat the rival Cardinals for just the third time in 10 games this season, delighting a home crowd of 42,343 — the largest at Wrigley Field since the home opener in 1978.
The Cubs responded in their first game following the firing of Hendry, who was let go about three hours before the game. He was replaced on an interim basis by assistant general manager Randy Bush.
Cardinals starter Jaime Garcia left with a 4-3 lead after he scattered nine hits in 6 1-3 innings. Garcia, who entered the game hitting .085, added an RBI single.
Chicago's Randy Wells gave up four hits in seven innings and struck out five. He set down the Cardinals in order in four of his seven innings, but was hurt by homers by Molina and Freese.
The Cubs nearly won the game in the ninth, but ran themselves out of the inning.
Tony Campana reached first leading off the ninth when second baseman Ryan Theriot bobbled a routine grounder for an error, but he was doubled up when Castro flied to center on what appeared to be a hit-and-run play. Reed Johnson followed with a two-out single, and Aramis Ramirez walked, but the threat ended when Carlos Pena flied out to right.
After trailing for 7½ innings, the Cubs tied it 4-4 in the eighth. Soto's double into the left-field corner scored Pena all the way from first base.
Molina's second-inning homer opened the scoring, and Garcia's single up the middle scored Theriot to make it 3-0. Freese hit a solo shot in the fourth to put the Cardinals ahead 4-1. He has an RBI in seven of his last eight games.
Barney brought the Cubs within 4-2 with his second homer of the season, landing a shot just barely into the basket in the left-field corner. His previous homer was April 25 against Colorado.
Barney added a triple when Lance Berkman overran a blooper into the right-field corner in the seventh. He scored when pinch-hitter Blake DeWitt's fly to center was misplayed by John Jay, and the ball rolled to the wall for another triple.
With DeWitt on third and one out, representing the tying run, Jason Motte relieved Garcia and worked out of the jam by striking out Castro and getting Johnson on a grounder.
NOTES: St. Louis' Allen Craig made his first career start in center field as manager Tony La Russa wanted to give the slumping Jay a break. Jay replaced Craig in the fifth inning. Cubs pitcher Andrew Cashner threw his third live batting practice session on Friday, the latest step in his recovery from a strained right rotator cuff that has had him on the disabled list since April 6. Larry King sang "Take Me Out to the Ballgame" during the seventh-inning stretch. Edwin Jackson will start for the Cardinals on Saturday against the Cubs' Matt Garza. Jackson will be making his first in Chicago since being dealt by the crosstown White Sox on July 27. He's won both of his career starts against the Cubs. Garza is 1-1 with a 7.80 ERA in three career starts against St. Louis. The big crowd was entertained by the U.S. Air Force Thunderbirds practicing over Lake Michigan a few blocks east of Wrigley Field during the middle part of the game in advance of the weekend's air and water show in Chicago.