The Spanish rider said the Vuelta "will be my last race as a professional cyclist".
The 34-year-old Spaniard, one of only six riders to have won the Tour de France, Vuelta and Giro d'Italia, confirmed the news in a video message on Instagram. It's a decision that was very thoughtful, and I don't believe there's a better farewell than in the home race and in my country.
Contador won the Tour de France in 2007 and 2009.
Contador is only one of six riders to have won all three Grand Tours, while he was the youngest to achieve the feat.
"I am sure they will be three great weeks, enjoying all your support and I'm looking forward to it".
Contador is a three-time victor of the Vuelta, sealing victories in 2008, 2012 and 2014, while he was also Giro champion in 2008 and 2015.
Cycling - The 104th Tour de France cycling race - The 183-km Stage 17 from La Mure to Serre-Chevalier, France - July 19, 2017 - Movistar rider Nairo Quintana of Columbia and Trek-Segafredo rider Alberto Contador of Spain in action.
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.
But Contador returned to racing and recorded a further two Vuelta wins (three in total) and a second win at the Giro d'Italia in 2015.
Speculation mounted that Contador, who was also stripped of the 2011 Giro, would retire following a disappointing showing at last month's Tour de France, where he finished ninth.