The 76-year-old departing monarch signed the measure into law earlier Wednesday during a brief ceremony at the royal palace in Madrid.
Prime Minister Mariano Rajoy added his signature and Juan Carlos rose and turned to embrace his son, who will reign as Felipe VI.
He will be proclaimed king before Parliament Thursday morning, with the nearly 700 members of the lower house and Senate, the entire Cabinet and more than 100 special guests in attendance.
The 46-year-old king will then deliver the first speech of his reign.
Leonor, the eldest daughter of King Felipe VI and Queen Letizia, will automatically become Princess of Asturias and heir to the throne.
Juan Carlos ascended to the throne Nov. 22, 1975, and Felipe de Borbon became Prince of Asturias in January 1977.