Upton delivered the game's first run with a solo shot in the fourth but San Diego came back to take the lead in the fifth on a two-run triple by Will Venable.
Upton struck again in the sixth with his 20th home run of the year to tie it and Nady came through in the seventh with his homer that also brought home Miguel Montero.
San Diego's deficit was reduced to one in the bottom of the seventh when Luis Martinez, called up from Class AAA Phoenix, made the first hit of his major league career a solo homer. It came in his second game with the Padres.
Kennedy (12-3) gave up two runs on four hits in six innings. Putz allowed a one-out single to Orlando Hudson in the ninth, but Hudson was thrown out trying to steal as Martinez was striking out swinging to end the game.
Cory Luebke (3-5) took the loss, giving up four runs on six hits in six innings.