Silva suffered an anterior cruciate ligament injury during pre-season training with Real Sociedad earlier this month.
Two goals and five assists in 28 La Liga games by Silva last season helped Real Sociedad finish fourth and qualify for the Champions League.
He signed a one-year extension to his contract in May but will not be able to fulfill it.
Silva joined Sociedad in the summer of 2020 on a free transfer after leaving Manchester City, where he won four Premier League titles, four FA Cups and five League Cups in ten years.
Silva won 125 caps for Spain and was an integral part of their squads that won the European Championships in 2008 and 2012, as well as the 2010 FIFA World Cup.
“Today is a sad day for me,” Silva said in a message posted on his Twitter account.
“Today it is time to say goodbye to what I have dedicated my whole life to.
“Today it is time to say goodbye to my colleagues, who are like family to me. I will miss you very much.”
Addressing the fans of the clubs he represented, which also included Valencia, Eibar and Celta Vigo, Silva added: “Thank you because you have made me feel at home.”