Cahill (13-12), 4-1 in his final five starts of the season, struck out a season-high nine and walked three. He was two outs shy of his third career shutout when Alfonso Soriano hit his 32nd home run of the season in the ninth.
Upton hit a booming two-run homer onto the second deck in left field in the fifth and had an RBI single Arizona's three-run first. Aaron Hill went 3 for 4 with two RBIs. He doubled in a run in the first and singled in one in the second off Justin Germano (2-10), loser of eight straight starts.
The Cubs fell to 0-18 in road games against the NL West. They have one more chance to end that streak, in the series finale on Sunday.
Chicago has lost seven in a row and 11 of 12 and is one loss shy of 100 for the season. Germano lasted 4 1-3 innings, giving up seven runs on 10 hits with five strikeouts, a walk and a hit batter.
Cahill even had a career-high two RBIs, doubling his total for the season. He drew a four-pitch, bases loaded walk from Lendy Castillo with two outs in the fifth and singled home Mike Jacobs from second in seventh. Jacobs barely evaded the catcher Wellington Castillo's tag on the throw from the right fielder DeJesus.
Cahill, a sinking fastball specialist who was
He got run support in a hurry in his final start of the season for the Diamondbacks, who were eliminated from playoff contention when the St. Louis Cardinals won Friday night.
Adam Eaton led off the Arizona first with a soft single to center, took second on Gerardo Parra's sacrifice bunt, then scored when Hill doubled to left. Hill had two doubles in the Diamondbacks' 8-3 win in the series opener Friday night.
Upton singled Hill home, advanced to third on Ryan Wheeler's two-out single, and scored when Jacobs, filling in for Paul Goldschmidt at first, singled to center.
The Diamondbacks added a run in the second when Eaton singled, took second on Parra's ground out and scored on Hill's single.
Arizona got three more in the fifth. Hill singled with one out, then Upton hit the first pitch well into the second deck down the left field line for his 19th home run. Miguel Montero was hit by a pitch and Wheeler walked. Germano seemed to be out of the jam when he got John McDonald to pop out for the second out and bring up Cahill. But the Cubs right-hander walked the Arizona pitcher on four pitches to bring home Hill and make it 7-0.
Notes: Darwin Barney was out of the Cubs lineup one day after his streak of 141 games without an error ended. Barney's streak tied the major league record for second baseman. .,. Goldschmidt was out for the second game in a row with a sore back. ... Hill's 43 doubles ties him with Goldschmidt for most on the team.... Cahill set a career high in strikeouts with 155.