Buckingham Palace said Prince Philip will return to Windsor Castle to continue with his recovery.
The statement added that the Prince "would like to convey his appreciation" for the well-wishes he has received.
The husband of Queen Elizabeth waved to the media as he was driven away from King Edward VII's Hospital in central London.
Save your missiles for terrorists - Russian Federation to US
German Chancellor Angela Merkel on Thursday said her country would not participate in any possible military action against Syria . Syria and its allies - Russia , Iran and the Lebanese militant group, Hezbollah - are coordinating and on "high" alert, she said.
Prince Philip waves as he leaves hospital.
Philip, who is best known for his mischievous sense of humour, forthright manner and off-colour jokes, formally retired from public life previous year but has attended some royal engagements since then.
The Duke of Edinburgh has had a successful hip replacement at the impressive age of 96.
A few hours later, Princess Anne was also photographed leaving the private hospital. He is progressing satisfactorily at this early stage. "He is comfortable and in good spirits". Prior to his surgery, Prince Philip skipped several major events that he was expected to attend, including Easter services.
Police investigate death of 7-month-old Kansas girl
Ian Jordan was involved in an accident on September 22, 1987, as he responded to a possible break-and-enter on Fort Street. Ole Jorgensen, the other responding officer and a close friend of Jordan's, suffered a serious leg injury in the crash.
Prince Philip attended his last official royal engagement in August 2017.
At the time, a royal spokesman said the duke had been experiencing some "trouble with his hip". "The order of the service was printed some weeks ago when it was hoped the duke would be able to take part", a royal source told US Weekly.
His daughter, Princess Anne - the Princess Royal, was the only royal visitor to the hospital, who had described him "on good form" after she visited her father yesterday.
Syria tensions can lead to 'full-blown military escalation', warns United Nations chief
France's foreign minister has cancelled trips to Albania and Slovenia because of rising global tensions around Syria. He says Moscow has "irrefutable information that it was another fabrication".