Juan Carlos, 82, made the announcement in a letter to his son, Felipe, to whom he handed power six years ago.
He said he would be available if prosecutors needed to interview him.
In June, Spain's Supreme Court opened an investigation into the alleged involvement of Juan Carlos in a high-speed rail contract in Saudi Arabia.
It was not immediately clear where the former monarch would now reside, but Spanish press reports say he is no longer in the country.
It is a humiliating exit for a king who had seemed set to go down in history as the leader who skilfully guided Spain from dictatorship to democracy after the death of General Franco in 1975, BBC Europe correspondent Nick Beake says.
Juan Carlos abdicated in 2014 after nearly 40 years as king following a corruption investigation involving his daughter's husband and a controversial elephant hunting trip the monarch took during Spain's financial crisis.
More about: Spain