Castillo was named the fourth-best prospect in the Pirates organization by Baseball America following the 2003 season, and he also ranked as the top Pittsburgh prospect by USA Today Sports Weekly. In 2003, Castillo was both the starting shortstop for the World Team in Major League Baseball's All-Star Futures Game and an All-Star in the Double-AEastern League.
Major league career
2004
In his rookie season, Castillo impressed the Pirates' front office with his defensive plays. In the field, he displayed good range and a very strong arm in 2004, even better than the Pirates expected from a former shortstop. At the plate, however, his play was more typical of a 22-year-old who had never played in Triple-A. Except for hot streaks in April and August, Castillo did not hit for average or power and was not very selective at the plate, striking out with regularity and walking very little despite hitting in front of the pitcher for most of the season. However, his power potential was apparent from the fact that the majority of his extra base hits and home runs were hit the opposite way—including a blast to center field on July 5, 2004, at Pro Player Stadium – and his minor league statistics indicated that his plate discipline should improve. He finished with eight home runs, 39 RBI and a.256 batting average, despite missing two months on the disabled list. Because of his defense and high ceiling, he entered 2005 as the Pirates' starting second baseman.
2005
2005 was a trying season for Castillo. He was on the disabled list for most of April with a strained left oblique muscle. In late August, he tore the medial collateral ligament in his left knee during a game against the St. Louis Cardinals and missed the rest of the season. Despite the injuries, Castillo showed progress both defensively and at the plate when he did play. In the field, he and shortstop Jack Wilson were largely responsible for the Pirates turning more double plays than any National League team except the Cardinals. At the same time, Castillo hit.268 with 11 homers and 53 RBI, significantly improving his power production while cutting down heavily on his strikeouts. The Pirates expected Castillo to be 100% for the start of spring training in February 2006, though he was not able to play winter ball in his native Venezuela.
2006
Castillo was the Pirates' starting second baseman in almost every game in 2006. After a slow April, Castillo was among the best hitters in all of the majors in May, culminating in his "Player of the Week" award for the last week in May, during which he led the NL in RBI, total bases, slugging percentage, and home runs. The 2006 Major League Baseball All-Star Game was held in Pittsburgh, and Castillo finished third among NL second basemen in the All-Star voting behind Chase Utley and Craig Biggio. Castillo's teammates Jason Bay and Freddy Sanchez represented the Pirates in the All-Star Game that year. But after a promising start, Castillo struggled down the stretch of the 2006 season. In the 92 games since homering seven times in a two-week span in May, Castillo hit only six home runs. He snapped an 0–23 hitting slump on September 23 against the Padres, but had been benched for three consecutive games before that. By the end of the season, his batting average had fallen to.253. His signature excellent defense was also missing at times in 2006, he committed a team high 18 errors. Castillo finished September batting only.087 for the month and did not start in several games. He finished the 2006 season with 14 home runs, 65 RBI, 131 hits, and 25 doubles to go along with his.253 batting average. Despite rumors he might be traded in the off-season, the Pirates elected to keep Castillo. With the emergence of infielders Freddy Sanchez and José Bautista, Castillo entered spring training with his role on the team uncertain.
2007
Castillo entered spring training slimmed down and had a stellar spring. But on March 23, the Pirates announced that José Bautista would start the season as the team's starting third baseman, meaning Castillo would start the season as a utility bench player. Though with Freddy Sanchez nursing an injury, Castillo started at second base for the first five games of the season. Through May and June, Castillo had received few starts and minimal pinch hit appearances. Though he received praise from manager Jim Tracy about his attitude after being left on the bench, Castillo's agent asked the Pirates to trade him due to poor playing time. With the team, and notably starting shortstop Jack Wilson, struggling, there was speculation Castillo could find his way into a starting role, or at least see his appearances become more regular. 2007 closed a disappointing season for Castillo. He played in only slightly over half of the team's games, and many of his appearances were as a pinch hitter rather than a starter. He never got into an offensive groove and finished with a.244 batting average, 24 RBI, and no home runs. He was released by the club on December 6.
2008
On December 24, 2007, Castillo signed with the Florida Marlins, but was placed on waivers in the spring. He was then claimed by the San Francisco Giants on March 22, 2008, who took on his $850,000 salary. Castillo opened up the 2008 season as the team's starting third baseman, replacing the Giants' departed third baseman, Pedro Feliz, and combining adequate defensive play with a.268 average and 26 RBIs through the month of June. Castillo was designated for assignment on August 13. He was claimed off waivers by the Houston Astros on August 20. He became a free agent at the end of the season and signed a minor league contract with the Washington Nationals on December 23.
Castillo signed a contract with the Yokohama BayStars of Japan for the 2010 season.
2011
Castillo signed with the Chiba Lotte Marines on June 21.
Death
On December 6, 2018, Castillo, Luis Valbuena, and Carlos Rivero were in a car in Yaracuy driven by Rivero's chauffeur when the group was ambushed by highway robbers. The driver attempted to avoid them but the vehicle struck a rock and overturned, killing Castillo and Valbuena. Four men were arrested in connection to the incident after being found in possession of the players' property. Castillo, Rivero, and Valbuena were members of Venezuelan winter team Cardenales de Lara, and were returning from a game played that day.