Castillo played for Cuba in the 1993 World Junior Championships in Windsor, Ontario, at which time he defected. After relocating to the United States, he enrolled in Miami Dade College where he played amateur baseball at the junior college level..
After being selected by the San Francisco Giants in the 1994 amateur draft, Castillo began his career in the Giants organization as a first baseman, although he did pitch a few times that season for the Everett Giants. After playing first base exclusively in 1995, he was converted to a full-time pitcher the following year.
He spent two more seasons in the Giants system, playing for the Bellingham Giants in 1996 and the San Jose Giants in 1997. That offseason, he was traded by the Giants to the New York Yankees in November 1997 as part of a package for Charlie Hayes. Castillo spent just one season, 1998, in the Yankees' farm system, splitting the season between the Greensboro Bats and Tampa Yankees.
The Yankees released Castillo in January 1999, and he was signed by the Chicago White Sox. The White Sox released Castillo during spring training, and he spent the 1999 season with the Schaumburg Flyers of the independent Northern League. In 2000, Castillo was brought to spring training by the San Diego Padres, but they, too, released him, and Castillo returned to the Flyers.
After the 2000 season, Castillo was signed by the Tampa Bay Rays, but he missed the entire 2001 season, and was released before the beginning of the 2002 season. He returned to the independent leagues, signing with the Newark Bears of the Atlantic League of Professional Baseball. In 2003, he was again invited to spring training by an MLB team, this time the St. Louis Cardinals. Once again, however, he was released before the season began, and he returned to the Bears.
In 2004, Castillo found himself without a major league team in the spring for the first time. He started the 2004 season with the Atlantic City Surf of the Atlantic League, then played for the Tuneros de San Luis Potosí of the Mexican League. After missing 2005 due to elbow surgery, Castillo played for the Atlantic League's Road Warriors in 2006 and the beginning of 2007. He finished 2007 with the Camden Riversharks.
Castillo finally returned to affiliated baseball when he was signed to a minor league contract by the Baltimore Orioles in 2008. He began that season with the Baltimore Orioles' Triple-A affiliate, the Norfolk Tides, before making his major league debut on April 28, 2008 in the 13th inning against the Chicago White Sox, he faced one batter and picked up the win. He spent the rest of the season with the Orioles, appearing in 28 games.
Castillo split the 2009 season between the Orioles and Norfolk, and began 2010 with the Tides as well. Castillo was recalled to the majors shortly thereafter, but on June 10 Castillo was designated for assignment to make room on the Orioles' roster for Jake Arrieta. He was then returned to Norfolk, where he finished the season. He was granted free agency on October 5, 2010. He was re-signed by the Orioles to a minor league contract in December 2010. After appearing in 20 games for Norfolk, he was granted free agency on June 15, 2011.
On June 18, 2011 the Arizona Diamondbacks signed Castillo to a minor league deal. He had his contract purchased on June 28. He appeared in 17 games with a 2.31 ERA for the Diamondbacks and then became a free agent on October 21.
He signed a minor league contract with the Los Angeles Dodgers before the 2012 season. On March 18 he was released.
On April 13, 2012, Castillo signed with the Piratas de Campeche of the Mexican Baseball League. He was released on May 4.
On April 4, 2015, Castillo signed with the Diablos Rojos del Mexico of the Mexican Baseball League. He was released on April 7. He was resigned on May 8.
On June 4, 2015, Castillo was traded to the Guerreros de Oaxaca. He was released on July 5.