The Cardinals homered off three pitchers during their five-run fifth inning.
Goldschmidt led off with his 13th homer, a drive to left against Zach Davies (5-6) that traveled an estimated 441 feet.
“I’ve had games here that have been good, and I’ve had games where they struck me out three times,” Goldschmidt said. “It’s just how it goes. I’m just trying to do my job, go up there and compete and help us win.”
Tyler O’Neill singled with one out before Edman, hitting for Matt Carpenter, greeted Adam Morgan with a two-run shot to left. It was Edman’s second career pinch-hit homer.
DeJong capped the scoring with a two-run shot off Dan Winkler for a 6-0 lead.
The Cardinals improved to 2-6 against the Cubs this season, their worst start against their division rival since dropping the first 12 in 1978.
Kim (4-5) extended his scoreless streak to 15 innings. He permitted five hits and walked one.
“Slider was really good. He was just in control, good rhythm, good pace,” Cardinals manager Mike Shildt said.
Cardinals catcher Yadier Molina was selected to his 10th All-Star Game to replace the Giants’ Buster Posey, who has a thumb injury. But Molina said he’ll skip due to a foot injury.
“I want to take those four days and rest and try to do it for the team,” he said. “I think that’s a smart decision.”
Brewers catcher Omar Narváez will instead go to the All-Star Game.
Cardinals: RHP Miles Mikolas (right forearm tightness) threw a bullpen and could go on a rehab assignment late this month. … RHP Jordan Hicks (right elbow inflammation) has resumed playing catch.
Cubs: As a precaution, Báez was removed in the top of the ninth after jamming his thumb, manager David Ross said. …INF/OF Kris Bryant (right hamstring) returned to the lineup after not starting the previous two games. … INF Matt Duffy (low back strain) and INF David Bote (dislocated left shoulder) are expected to begin rehab assignments the week of July 18.
RHP Adam Wainwright (7-5, 3.58 ERA) is scheduled to start Sunday’s series finale for St. Louis against RHP Trevor Williams (3-2, 5.51 ERA).
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports