Jason Kubel also went deep for the defending NL West champion Diamondbacks, who have won four in a row and six of seven. Arizona entered just two games behind division-leading San Francisco.
Kennedy (10-8) allowed seven hits and two runs.
Takashi Saito and David Hernandez each worked a scoreless inning before J.J. Putz finished for his 20th save in 23 tries.
Shortly after Upton connected off fill-in starter Kyle Kendrick (4-9), his older brother also hit his 100th homer over in the American League. Tampa Bay's B.J. Upton went deep in the fourth inning against Baltimore.
Kendrick started in place of Joe Blanton, who was traded to the Los Angeles Dodgers 2½ hours before the game. Blanton was the third player dealt this week by the cost-cutting Phillies. They sent center fielder Shane Victorino to the Dodgers and dealt right fielder Hunter Pence to the Giants on Tuesday.
The five-time defending NL East champions have been stuck in last place and made the moves to trim payroll. Victorino and Blanton are eligible for free agency after the season, and neither figured into Philadelphia's budget.
Kendrick gave up three runs - two earned - and five hits in four innings.
Upton crushed one way out to left in the second to give the Diamondbacks a 1-0 lead and end Kendrick's career-best, 22-inning scoreless streak.
Upton preserved a 3-2 lead in the sixth by throwing out the tying run at the
Kubel hit his 23rd homer of the season off Josh Lindblom in the ninth.
A sacrifice fly by Paul Goldschmidt made it 2-0 in the fourth. Chris Johnson's two-out RBI single gave Arizona a 3-0 lead.
Utley drove a 3-2 pitch out to right to get the Phillies within 3-1 in the bottom half.
Kennedy had control issues in the fifth. He loaded the bases by hitting one batter and walking two. Nate Schierholtz hit a sacrifice fly to cut it to 3-2.
The Phillies appeared to tie it in the sixth on Kevin Frandsen's two-out single to right, but Upton threw out John Mayberry Jr. trying to score to end the inning. Replays showed Mayberry slid across the plate before Miguel Montero's tag, and manager Charlie Manuel argued briefly with umpire Jim Wolf.
This was the first time the Phillies played a home game in August with a double-digit deficit in the standings since Aug. 20, 2006. They were 61-62 and 14 games behind division-leading New York that day. But they finished 85-77, which would have earned them a wild-card spot if two were available back then.
There were plenty of empty seats at Citizens Bank Park, but enough tickets were sold to make it 271 consecutive sellouts, counting postseason games.
The loudest cheers were for a fan sitting behind the plate after he caught a foul ball while spilling most of his beer but hanging onto the cup.
Notes: Utley hit his sixth homer in his 97th at-bat. Last year, he had just 11 homers in 398 at-bats. ... Johnson has eight RBIs in four games since being acquired from Baltimore. ... Arizona is 11-3 in its last 14 games. ... Phillies All-Star C Carlos Ruiz (foot) was out of the lineup. ... Roy Halladay (4-6, 4.33) faces Joe Saunders (5-7, 3.62) on Saturday night. Halladay is winless in three starts since returning from the disabled list, but the Phillies are 2-1 in those three games.