Juan Carlos, 82, announced the move on Monday 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 on Monday, Spain's El País newspaper reports. It is unclear where Juan Carlos is, though some Spanish media report he is in the Dominican Republic.