Silva represented his country on 125 occasions, scoring 35 times in an international career that spanned 12 years.
The playmaker helped La Roja lift their first World Cup title in 2010, and also played a part in back-to-back European Championship triumphs in 2008 and 2012.
But after more than a decade playing for his nation, Silva has decided to call it a day and focus on his club career.
"It is not easy, after everything I have experienced, to sit down and write this letter," the 32-year-old star explained in an open letter posted on Twitter.
"There have been days and weeks of reflection and analysis to make the decision to finish my time in the Spain national team. Without a doubt it is one of the hardest decisions in my career.
"The national team has given me everything and has allowed me to grow as a player and as a person from my first days in the youth set-up. I leave with pride after playing 125 games and scoring 35 goals in a 12-year spell where we lifted the World Cup and two European Championships.
"I leave happy with all I have achieved, experienced and dreamed with a team that will be remembered forever, and I have ended an era filled with emotion from all those moments that come to my mind, like the figure of Luis Aragones, a teacher that none of us will ever forget.
Gracias, suerte y hasta siempre! 🇪🇸 pic.twitter.com/mIM1k45pfg— David Silva (@21LVA) 13 de agosto de 2018
"I cannot leave without thanking all of my team-mates, the coaches that had faith in me and the RFEF employees that do everything to make our lives easier.
"I also want to thank my family for their support over the years, without their help I would never have been able to form part of this team. And of course, the fans who have always given me their support and respect every time I wore the Spain shirt.
"Thank you, good luck and farewell!"
Silva is the third Spain star to hang up his boots following the nation's World Cup last-16 exit at the hands of hosts Russia.
Andres Iniesta revealed minutes after July's penalty shoot-out defeat he was standing down, while Gerard Pique followed his former Barcelona captain's example on Saturday during a press conference.