Contador, 34, published a video announcement via Instagram on Monday morning confirming his final Grand Tour participation.
"Hi all, I'm doing this video to inform you all of two things," said Contador. "One is that I will participate in the next Vuelta a España from August 19, and the second is that will be my last race as a professional.
"I say this happy, without sadness. It's a decision that I have thought very well and I don't think there is a better farewell than in the home race and in my country.
"I'm sure they will be three wonderful weeks enjoying all your affection, and I'm eager that they come. Greetings, and see you on the road from August 19."
Contador is part of a select group of riders in the sport's history, having won all three Grand Tour during his career: the Tour de France (2007 and 2009), Vuelta a España (2008, 2012 and 2014) and Giro d'Italia (2008 and 2015 – the latter being his last Grand Tour victory).
He completed the 2017 Tour in July in ninth place overall, suffering from a couple of minor crashes and looking off the form that has seen him win seven Grand Tours.
While riding for Tinkoff, Contador had previously said that he would retire at the end of the 2016 season, but decided to carry on into 2017 with Trek-Segafredo.
His professional career began in 2003 with the Spanish ONCE team, and he gradually started to build up impressive results until his career really took off when he signed for Discovery Channel in 2007. That year, he won Paris-Nice, Vuelta a Castilla y León and more importantly, the Tour de France.
A rare Giro-Vuelta double victory followed in 2008 in his first year with Astana and 2009 saw him win the Tour for a second time.
However, in 2010 his third Tour victory was anulled after he tested positive for clenbuterol during the race, which he blamed on a tainted steak. He was eventually given a back-dated suspension in February 2012 for two years after a controversial and protracted legal case, and had all of his results stripped from July 2010 to February 2012 – which also included victory in the 2011 Giro.
After returning to competition in late 2012 he won the Vuelta twice more and the Giro once, though another Tour victory would elude him.
The 2017 Vuelta may actually be one of his toughest tests yet, as it will feature Tour champion Chris Froome (Team Sky), Fabio Aru (Astana), Vincenzo Nibali (Bahrain-Merida), Romain Bardet (Ag2r), and Simon and Adam Yates (Orica-Scott).
General manager of Trek-Segafredo Luca Guercilena wished Contador well in his retirement, saying: "It has been an honor to work with such a great champion. Alberto Contador has been showing his fighting spirit and his professionalism all year long. To give you one example, in this year's Tour de France he demonstrated his personal motto in a way we only could admire: 'Where there's a will, there's a way.'
"Even after the crashes that took him out of the fight for the first places in GC, he kept fighting and battling for a stage win and to move up some places in GC. That showed how strong he is, both mentally and physically."
"It was great to have him in the team, even it was only for one season, and we will keep giving it our all to help him to achieve a big result in his last Vuelta a España and it goes without saying we wish him the very best for his future afterwards!"
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1