The Diamondbacks also got 23-year-old right-hander Matt Stites, who is 2-2 with a 2.08 ERA and 14 saves in 46 games with Double-A San Antonio.
Arizona has lost three straight and is 3½ games behind first-place Los Angeles in the NL West. San Diego is 8½ out.
San Diego general manager Josh Byrnes said the Padres are excited to add a pitcher of Kennedy's pedigree, even though the right-hander has struggled mightily of late.
"He is under club control through 2015, and we feel he will help us take another step forward as a team," Byrnes said.
Byrnes was general manager of the Diamondbacks when Arizona acquired Kennedy from the New York Yankees in 2010.
Kennedy is 49-38 with a 3.99 ERA in 133 major league games, all but two as a starter. He was Arizona's opening-day pitcher the past two seasons but is 0-5 in his last 10 starts, a period that included a 10-game suspension for his role in the incident that led to a bench-clearing brawl against the Los Angeles Dodgers on June 11. The brawl erupted after Kennedy hit Zack Greinke with a high pitch after doing the same to Yasiel Puig earlier in the game.
Kennedy's last victory was June 1 against the Chicago Cubs.
Thatcher bolsters what's been a shaky bullpen for Arizona. He has limited left-handed batters to a .215 average.
Arizona gets the Padres' competitive balance pick between the second and third rounds of next year's draft.