The Padres will send cash to the Braves to complete the deal.
Alonso, the brother-in-law of Padres third baseman Manny Machado, returns to San Diego, where he played from 2012 to 2015. It's also the city where Machado and Alonso's sister make their offseason home.
"I'm definitely excited to have my brother-in-law finally on the same team," Machado said on Tuesday after the Padres beat the Dodgers 6-2.
Alonso was on the Braves' restricted list after not reporting to their alternate training site. He will report to the Padres' alternate site at the University of San Diego.
The Associated Press contributed to this report.