The 82-year-old announced the move yesterday 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.
The former king had most likely already left when the letter was released.
It is unclear where Juan Carlos is, though some Spanish media report he is in the Dominican Republic.