Samardzija ran into trouble in the first inning, loading the bases with two out on two walks and a hit. But he struck out Jason Kubel looking to end the threat.
The Cubs took the lead in the fourth inning on David DeJesus' leadoff double to deep center field, followed by a sacrifice and Rizzo's RBI double. Rizzo came home to score on a single by Schierholtz.
DeJesus was in the lineup for his first game since going on the 15-day disabled list with a right shoulder sprain on June 15.
After Samardzija got out of another two-out, bases-loaded jam in the bottom of the fourth, the Cubs did their damage in the fifth. With two out, DeJesus singled and scored on Junior Lake's double. Rizzo walked, then Schierholtz pulled his home run down the right field line.
That gave the Cubs a 6-0 lead, with all runs coming off Diamondbacks starter Ian Kennedy. The right-hander has struggled in his last three starts at home. Wednesday he lasted five innings, giving up six runs on seven hits while striking out seven.
Lake doubled in the first inning and added his RBI double in the fifth, raising his hit total to 14 in his first six games in the majors.
The Diamondbacks got on the board in the fifth when Samardzija again loaded the bases, this time with none out. With one out, Martin Prado hit a sharp ground ball up the middle that Chicago second baseman Darwin Barney let go under his glove for an error. Two runs scored, but Samardzija avoided further damage.
"The Diamondbacks do that to me every time. They have a great approach at the plate and they have a plan against me," Samardzija said. "It was a good battle out there. You just can't walk guys, it brings up your pitch count."