Doctors gave him a temporary hip joint in a two-and-a-half-hour operation on September 24 because of an infection in tissue around a previous prosthetic joint that had been fitted in November 2012, which was making it difficult for him to walk.
They will now fit him with a permanent replacement joint in another operation on November 21st, a royal palace spokesman said.
The operation will be carried out at the Quiron Hospital in suburban Madrid by Miguel Cabanela, a Spanish surgeon based in the United States, the spokesman added.
It will be the king's ninth operation in just over three years.
The monarch's latest health problems have fed speculation of a possible abdication in favour of his son Felipe, 45, despite unequivocal palace denials.
Prince Felipe took his father's place at a national day parade on October 12th for the first time and also replaced him at the annual Iberoamerican summit of Spanish, Portuguese and Latin American leaders in Panama last month.
Juan Carlos is widely respected for his role in guiding Spain's transition to democracy after the death of longtime dictator General Francisco Franco in 1975.
His image has suffered in recent years, however, in particular because of a corruption scandal implicating his youngest daughter Cristina and centring on her husband, Iñaki Urdangarin.
Under investigation since late 2011 for alleged embezzlement of public funds, Urdangarin has appeared in court for questioning but has not been formally charged with any crime. The judge probing the case has ordered a report on Cristina's tax affairs.
On Monday, a court in Mallorca ordered the impounding of a luxury villa and several other properties belonging to Urdangarin.
The king himself sparked outrage last year for taking an expensive elephant-hunting holiday in Botswana while Spain struggled through a recession with one in four workers out of a job.
He broke his right hip during the trip and had to be flown home for surgery, after which he made an unprecedented public apology.
The hunting trip threw the spotlight on the royal family's luxury lifestyle and on the king's friendship with Corinna zu Sayn-Wittgenstein, a German aristocrat 28 years his junior, who reportedly accompanied him to Botswana.