Chicago also purchased the contract of infielder Matt Skole from Triple-A Charlotte and recalled catcher Seby Zavala from Triple-A.
Castillo is required to miss a minimum of three games. He's hitting .175 with five homers and 16 RBIs in 46 games.
Skole, 30, was slashing .248/.384/.497 with 21 homers, 56 RBIs and 65 runs in 92 games at Triple-A. He played in four games for the White Sox in 2018.
Zavala, 25, was hitting .218 with 16 homers, 36 RBIs and 40 runs in 61 games at Triple-A, where he also threw out 34 percent of attempted base-stealers. Zavala went 1-for-9 with a run in three games with the White Sox earlier this season. He made his MLB debut on May 25.
The White Sox open a three-game series at the Philadelphia Phillies on Friday evening.