Silva made a total of 125 appearances for the Spanish national side, winning two European Championships and one World Cup title.
"I lived and dreamed with a team that will forever be remembered," Silva wrote in a Twitter post.
"It has not been easy, after all I've experienced, to write these lines.
"I've spent days and weeks considering this. The national team gave me everything and helped me grow as a player and a person.
"I leave proud and happy, bringing an end to a time full of emotions and memories, like of the figure of Luis Aragones, a maestro who will never be forgotten."