“I would like to inform you that I have decided not to run for the upcoming RFEF elections,” the Porto goalkeeper wrote on social media.
The 39-year-old said he was pulling out of the race for the top job in Spanish football as a result of the “exceptional social, economic and health situation that our country is suffering”.
He said the COVID-19 outbreak which has claimed over 27,000 victims in the country had relegated the election into “second place”.
Casillas, who led Spain to their first World Cup title in 2010, had announced his intention to stand against current RFEF president Luis Rubiales back in February.
His defection now leaves the way clear for Rubiales to gain a second mandate in the election scheduled for August 17.
Casillas played 167 times for Spain, also winning two Euros in 2008 and 2012, and made more than 700 appearances for Real Madrid, with whom he won five La Liga titles and the Champions League three times, before joining Porto in 2015.
Named in the FIFA FIFPro World XI five years in a row between 2008 and 2012 he suffered a heart attack in May 2019 during training and has not played another competitive match since.