The Cubs had lost 18 in a row against NL West opponents. The win allowed them to avoid a 100th loss this season, with three games remaining.
Chris Rusin (2-3) allowed one earned run and three hits in five innings.
Brian LaHair's two-run single capped a four-run sixth inning against Bryan Shaw (1-6) and two other Arizona relievers.
Chicago trailed 2-1 when Rizzo and Alfonso Soriano singled with one out in the sixth. Starlin Castro was safe when first baseman Mike Jacobs couldn't pick up his grounder down the line, and the error loaded the bases.
After Mike Zagurski struck out Luis Valbuena, Matt Albers relievers. Pinch hitter Dave Sappelt hit a grounder that Jacobs scooped, but the throw to Albers covering first base was late. Sappelt's infield hit made it 2-all.
Albers then hit Anthony Recker with a pitch to force home the go-ahead run and LaHair's single made it 5-2.
The Cubs added an unearned run in the seventh on a three-base throwing error by Brad Bergesen, the Diamondbacks' fifth of seven pitchers, and another error two batters later by third baseman Cody Ransom.
DeJesus homered to right off Takashi Saito in the ninth for Chicago's final run.
Rizzo doubled home DeJesus in the first for a 1-0 lead.
The Diamondbacks scored twice in the
NOTES: SS Castro came up limping after turning a double play in the eighth but remained in the game. ... Aaron Hill went 1 for 3 to move into fifth place on the Diamondbacks' single-season hits list with 180. ... Collmenter, who started the season in rotation but floundered, finished the year with 11 starts and 17 relief appearances. He allowed 20 earned runs in his first four starts but only 17 the rest of the way. ... Cubs 2B Darwin Barney, whose 141-game errorless streak was snapped on Friday, returned to the lineup after an off day on Saturday. ... Arizona 1B Paul Goldschmidt missed his third straight game with a sore back. ... RHP Jason Berken (0-2) will be the next to try and keep the Cubs from their 100th loss when he takes the mound Monday night against RHP Lucas Harrell (10-11) and the Houston Astros. Berken will be making his fourth start since he was claimed off waivers from Baltimore on Sept. 7. ... Arizona LHP Wade Miley (16-11) will face Colorado LHP Drew Pomeranz (1-9) on Monday. Miley is tied with Jason Jennings, the 2002 NL Rookie of the Year, for the most wins by an NL rookie since 1986.