The former Manchester United and Ecuador captain recently played for Mexican top flight side Queretaro after leaving Liga de Quito.
Valencia played for the likes of Villarreal, Recreativo Huelva and Wigan Athletic but it was at Manchester United where he made his name.
Valencia spent 10 years at Old Trafford between 2009 and 2019 and made 339 appearances, becoming club captain along the way and winning two Premier League titles, one FA Cup, two League Cups and the Europa League.
He was signed by Sir Alex Ferguson from Wigan as a winger but later converted to full back and performed with much distinction.
Announcing his retirement with a post on Twitter, Valencia said: "At the age of 14, as a child, I left my village and my first team to travel to the capital of my country. I travelled with a lot of nostalgia bug full of hope."
"A few years later I was able to travel to Europe, something I had never dreamed of. I played in Spain, and then came to my second home: England.
"Wigan was a unique experience, and then God gave me the opportunity to join Manchester United. I will never forget everything I experienced at Old Trafford.
"I will never forget every goal, every trophy and the wonderful fans.
"I did not think this moment would come so soon, but my body has asked me to make this decision. I am announcing my retirement from football.
"I want to thank everyone who has been part of my career and life. God in the first place, for always blessing me. Zoila and my daughter Domenik who have been my pillars.
"My parents for giving me so much. To fans of all the countries where I have played, I always tried to give my best. Thank you for your affection and support."
Valencia amassed 99 caps for the Ecuador national team and played at two FIFA World Cups.