In June 2010, Castillo was named in the 23-man squad of Uruguay for the 2010 FIFA World Cup in South Africa as the second choice goalkeeper behind Fernando Muslera and before Martín Silva. Despite spending the entire tournament on the bench, Uruguay finished fourth in the tournament, their best finish since 1970. He played 90 minutes in a friendly against Indonesia at the Gelora Bung Karno Stadium on 8 October 2010, in which Uruguay won 7–1 despite being conceded first by Boaz Solossa.