In June, the Spanish Supreme Court opened an investigation into Juan Carlos' involvement in a high-speed rail contract in Saudi Arabia, after Switzerland's La Tribune de Geneve newspaper reported he had received $100 million from the late Saudi King.
Through his lawyer, Juan Carlos, 82, has declined to comment on the allegations.
"Guided by my desire to do what is best to serve the Spanish people, its institutions and you as king, I am informing you of my ... decision to leave Spain at this time," the palace statement quoted Juan Carlos' letter to the king as saying.
King Felipe thanked Juan Carlos for his decision, underlining "the historic importance that his father's reign represents" for democracy in Spain.
He also reaffirmed "the principles and values on which it (democracy) is based according to our Constitution and legal framework."
Spanish monarchs have immunity during their reign but Juan Carlos abdicated in 2014, potentially leaving himself vulnerable to prosecution.
King Felipe put an end to his father's palace allowance and renounced his own inheritance in March, following allegations of secret offshore accounts.
Juan Carlos came to the throne in 1975 after the death of General Francisco Franco and was widely respected for his role in helping guide Spain from dictatorship to democracy.But his popularity sank in later years due to a series of scandals, prompting him to step down.Spain's far-left Deputy Prime Minister Pablo Iglesias called former king Juan Carlos' decision to leave the country amid a corruption investigation unworthy of a former head of state and said it compromised the Spanish monarchy.
"Juan Carlos de Borbon's flight abroad is an act unworthy of a former head of state and it leaves the monarchy in a very compromised position," Iglesias, who is the leader of the far-left Podemos party that is part of the ruling coalition, said in a Facebook post on Monday.He said that Juan Carlos should respond for any alleged wrongdoing in Spain and added that a democratic government could not justify behaviors that undermine the monarchy.