Prince Philip underwent heart surgery on March 3 just three months before his 100th birthday.
He left the private King Edward VII’s Hospital in central London in the back of a black BMW on Tuesday morning.
The duke, the nation’s longest-serving consort, has spent 28 nights as an in-patient – his longest ever stay – after being first admitted on February 16.
He was initially driven to King Edward VII’s Hospital by car after feeling unwell at Windsor, but two weeks later was moved to St Bartholomew’s Hospital in the City of London by ambulance.
He had a successful procedure on a pre-existing heart condition at St Bartholomew’s on March 3, before being transferred back to King Edward’s to recuperate and to continue his treatment.
Concern has been heightened for the duke because of his advanced age and amid troubled times for the royals.
The monarchy was plunged into crisis while Philip was in hospital following the shocking allegations of racism made by the Duke and Duchess of Sussex in their Oprah interview.
Harry and Meghan, who faced calls to postpone the interview because Philip was unwell, accused an unnamed royal – not the Queen nor the duke – of raising concerns about what colour their son Archie’s skin tone would be before he was born.
Meghan also told of how she begged for help when she was suicidal, but said the institution gave her no support.
The Queen, 94, said the issues were concerning, but that “some recollections may vary” and the matter was a family one that would be dealt with privately.
The Duke of Cambridge, meanwhile, defended the House of Windsor, saying on a visit to a school in east London: “We’re very much not a racist family.”
Philip has been treated for heart problems in the past and in 2011 was rushed to hospital by helicopter from Sandringham after suffering chest pains as the royal family was preparing for Christmas.
In the serious health scare, he was treated for a blocked coronary artery at Papworth Hospital in Cambridgeshire and underwent a minimally invasive procedure of coronary stenting.
A message from the Editor: