It was a big offensive day for the Cubs, who recorded a season-high in runs and totaled 16 hits -- including a career-high four from rookie Starlin Castro. Soto finished 3-for-5 with five runs batted in, while Tyler Colvin added a solo homer.
Ryan Dempster (9-8) gave up three unearned runs in six innings for Chicago, which dropped the first two contests of this series, which featured two lopsided games. The Brewers won Monday's opener by an 18-1 score.
Milwaukee starter Manny Parra (3-9) allowed six runs on six hits and three walks in 5 2/3 innings. He also struck out eight, but lost his fourth consecutive decision.
Jim Edmonds went 2-for-3 for the Brewers, who have lost six of eight overall.
"You'd rather win two out of three than lose two out of three," said Brewers outfielder Ryan Braun. "But I think every day presents a unique challenge, and the last two games don't factor much into today, but overall not a bad series."
Following Colvin's two-out homer in the third, Milwaukee took the lead in the fifth. With runners on the corners and two outs, a throwing error by Jeff Baker allowed Edmonds to score. Corey Hart followed with a two-run double to make it a 3-1 contest.
But the Cubs exploded for six runs in the sixth to take command. With two on and one out, Soto hit an RBI single. After Parra struck out Alfonso Soriano, DeWitt and Baker followed with run-scoring singles.
Parra was removed in favor of Todd Coffey as Ramirez came up as a pinch- hitter and slammed a three-run shot to left-center to make it a 7-3 game.
"He made a mistake. He left me a slider right over the plate, and I put a good swing on it," Ramirez said.
Soto's three-run blast off LaTroy Hawkins in the seventh extended Chicago's lead to seven, and the hosts added five runs in the eighth. Derrek Lee hit an RBI double, Soto added a run-scoring single, and DeWitt tacked on his three- run shot, which just sneaked over the right field fence.
Hawkins was ejected in the seventh after hitting Soriano with a pitch. Brewers manager Ken Macha was tossed shortly thereafter for arguing with home plate umpire Tom Hallion's decision...Carlos Zambrano pitched a scoreless seventh for the Cubs, who announced Wednesday he would be re-inserted into the rotation. He will get the ball Monday against San Francisco, taking the spot held by the injured Carlos Silva (irregular heartbeat). Zambrano has not started since June 25, when a blowup in the dugout resulted in a month-long suspension...DeWitt got his first homer with Chicago since being acquired from the Dodgers over the weekend.