The palace said the 74-year-old's injury was "linked to arthritis," the BBC reported.
Carlos, the palace said, was hospitalized Friday night after his arrival in Madrid from Botswana, where he had fallen, CNN reported.
The Spanish daily El Pais said he had been hunting elephants when he fell.
Carlos underwent surgery Saturday morning at San Jose Hospital in Madrid.
The king has undergone three other operations since May 2010 -- to get an artificial right knee joint, have a benign lung tumor removed and have a torn Achilles repaired.
Notable deaths of 2014 [PHOTOS]