The 27-year-old has appeared in 24 Major League games over the last two seasons with the Dodgers, hitting .171 in 41 at-bats with two home runs.
Castellanos hit .257 with 19 home runs, 61 RBIs and 19 steals in 105 games in 2013 with the Dodgers' Triple-A affiliate in Albuquerque.
He was originally drafted in the 10th round of the 2008 First-Year Player Draft by the Cardinals as an infielder but has since moved to the outfield.
Castellanos has now been a part of four organizations since the end of last season -- Dodgers, Red Sox, Rangers and now the Padres.
In order to make room on the 40-man roster, the Padres placed left-handed pitcher Cory Luebke on the 60-day disabled list. Luebke had his second Tommy John surgery last month after having the same surgery in May of 2012.
Corey Brock is a reporter for MLB.com. Keep track of @FollowThePadres on Twitter. This story was not subject to the approval of Major League Baseball or its clubs.