The 96-year-old Duke of Edinburgh was admitted to King Edward VII Hospital in Marylebone yesterday for the procedure. He is likely to remain there for several days, the palace said.
The exact nature of Philip's hip problem was unclear but Buckingham Palace said an update on his health would be given when appropriate. A few days before, The Queen's husband also missed the Maundy Thursday service at St George's Chapel. The Queen and the Duke of York were in attendance at the event.
In the 1960s he was one of the top four polo players in Britain.
In May 2017, the Duke of Edinburgh stepped down from his royal duties after announcing his retirement. The duke is 96.
Kensington Palace shared that Harry and Markle have invited 2,640 people into the grounds of Windsor Castle to watch the couple's arrival, as well as their departure as they depart the castle on a carriage procession through the town of Windsor. They will find it hard to restrain him.
His final solo engagement was on 2 August past year, when he reviewed a parade of Royal Marines outside Buckingham Palace in his capacity as Captain General of the corps. At that time, he was supposed to attend the State opening of Parliament with Queen Elizabeth.
Philip is now expected to attend Harry and Markle's May 19 wedding at St. George's Chapel with other members of the royal family.
Philip is not the only member of the Royal family to undergo a hip operation in their 90s.More news: Fantastic Four Teased By Marvel?
More news: Trump wants to use the military to secure border with Mexico
More news: Pochettino unclear over whether Kane might return against Chelsea
Buckingham Palace announced the news in a statement on Tuesday.
In June 2013, Prince Philip reportedly spent 11 nights at a private London Clinic, following an abdominal surgery.
The top of the thigh bone is removed and replaced with a metal stem that has a smooth ball on the end.
Rehabilitation can be demanding and requires commitment, with patients having to walk with crutches for the first four to six weeks after the operation.
Patients tend to feel back to normal after about three months.
Scarlett McNally, an orthopaedic surgeon and council member of the Royal College of Surgeons, said fitness was more important than age when it came to recovering from surgery.
Figures for the United Kingdom, excluding Scotland, show 851 people over 90 had a hip replacement in 2016.
This evening's announcement confirms that The Queen's husband underwent a full hip replacement procedure.