The 99-year-old left King Edward VII hospital in London following treatment for an infection and a heart condition.
Prince Philip, the husband of the Queen of England, has left hospital after a month of treatment for an infection and heart surgery.
The 99-year-old was admitted to King Edward VII hospital in London on 16 February, for what Buckingham Palace initially said was "a precautionary measure".
He was then moved to St Bartholomew’s, also in the capital, for a check on a pre-existing heart condition, the palace said.
There he underwent “successful” surgery for a heart problem.
The prince, who will turn 100 in June, retired from public duties in 2017.
He underwent a hip replacement in 2018 and was treated for a blocked coronary artery in 2011.
A former naval officer who served in the second world war, the Duke married the then-Princess Elizabeth in 1947 and is the longest-serving royal consort in British history.
He and the queen have four children, eight grandchildren and nine great-grandchildren.