Yahoo Sports' Jeff Passan first reported the transaction.
The Cubs also announced that Medina will report to Triple A Iowa. Chicago purchased the contract of first baseman Mike Baxter from Iowa, according to the team's official website. Baxter will fill Castillo's 25-man roster spot.
The 28-year-old Castillo, who had spent each of his previous five MLB seasons with the Cubs, is hitting .163 with two home runs and five RBIs in 24 games this season, and only has three hits in his last 27 at-bats.
The Cubs still have two catchers on the roster, Miguel Montero and veteran David Ross.
Medina, 26, has appeared in 12 games this season, giving up 11 hits, four earned runs with three holds in 12 innings.
Chicago (21-16) has made a flurry of moves in recent days, designating left-hander Phil Coke for assignment and optioning pitchers Dallas Beeler and Brian Schlitter to Triple-A Iowa.
The team also activated left-hander Tsuyoshi Wada from the 15-day disabled list. Wada will make his season debut and start Wednesday's game the San Diego Padres after Travis Wood was sent to the bullpen.
- Scooby Axson