The 98-year-old is expected to join the rest of Britain's royal family for Christmas at Sandringham House in eastern England. He was set to fly there by helicopter.
Live footage showed the prince leaving the hospital on foot and entering a vehicle unaided.
Philip had been in the private hospital since Friday. His admittance was said to have been a "precautionary measure."
Buckingham Palace would not go into details about his ailment or the nature of his treatment.
Philip's decision to retire from public duties in 2017 was not health-related, the palace said at the time.
On Monday, Prince Charles said his father was "all right."
"When you get to that age, things don't work so well," he said.