Sergio Alcantara also homered and Jake Arrieta threw five strong innings for the Cubs, who took two of three. The Cubs beat the Padres five times in six games in a 10-day stretch, including a three-game sweep at Wrigley Field last week.
The Cubs bounced back nicely from losing the first three of a four-game series at San Francisco, which leads the NL West.
Darvish (6-2) retired the first nine Cubs batters before Joc Pederson hit a towering home run to right-center field leading off the fourth to tie it at 1. It was Pederson's seventh.
Darvish pitched well but took the hard-luck loss when the Cubs scored the go-ahead run in the seventh on Anthony Rizzo's double-play ball. Darvish opened the inning by walking Ian Happ and allowing a single to right by Patrick Wisdom before Rizzo hit into a 4-6-3 double play to bring in Happ.
Darvish was traded from the Cubs to the Padres on Dec. 29, along with Victor Caratini, his personal catcher. Darvish finished second in the NL Cy Young Award voting in 2020 while with the Cubs.
Darvish allowed two runs and three hits in seven innings, struck out eight and walked two.
Alcantara homered off Emilio Pagan with one out in the eighth, his first.
Arrieta allowed one run and four hits in five innings, struck out six and walked one. He finished strong, striking out the side in the fifth after allowing a leadoff single to former Cubs catcher Victor Caratini.
Arrieta allowed Manny Machado's RBI single in the third.
Rex Brothers (2-0) pitched a perfect sixth for the win. Craig Kimbrel, who was San Diego's closer in 2015, pitched a perfect ninth for his 15th save in 17 chances.
The Cubs haven't named a starter for Friday night's opener of a three-game home series against the St. Louis Cardinals.