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.
Atlantic League
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.
Baltimore Orioles
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.
Arizona Diamondbacks
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.
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.