The team announced Tuesday that Castro would miss the remainder of the season because of discomfort in his knee. He was placed on the 15-day disabled list and surgery was performed Thursday in Houston.
Castro batted .276 with 18 homers and 56 RBIs, all career highs, in 120 games.
The 26-year-old Castro has been dealing with knee issues since 2011 when he missed the entire season after an operation to repair a torn anterior cruciate ligament.
He appeared in 87 games last season and was on the DL twice because of fluid in the knee.