A two-time All-Star and former Silver Slugger Award winner, Quentin has belted at least 21 home runs in each of the last four seasons.
In 2011, he batted .254 with 24 home runs, a career-high 31 doubles and 77 RBI in 118 games for the White Sox.
"Improving our offense is a priority this offseason," said Padres general manager Josh Byrnes, "and the acquisition of Carlos gives us a proven middle- of-the-order bat. We specifically targeted Carlos because of his production and his hard-nosed style of play."
For his career, the 29-year-old has hit .252 with 121 home runs and 383 RBI in 616 games with Arizona and the White Sox.
Castro, a 23-year-old right-hander, went 7-8 with a 5.63 earned run average in 22 starts between Double-A San Antonio and Triple-A Tucson last season.
Hernandez appeared in 28 games (18 starts) across three levels in the Padres organization in 2011. The 22-year-old southpaw finished the year with a combined 10-3 record and a 3.49 ERA.