Prince Philip had stayed at Aberdeen Royal Infirmary for five nights to receive treatment for a bladder infection.
He had been staying with the Queen at Balmoral when he was taken to hospital with a recurrence of the condition which hospitalised him during the Diamond Jubilee celebrations earlier this year.
The Duke did not receive any visitors during his third hospital stay in the last nine months, BBC News reports, but was said to have been in contact with family members via the phone.
A royal spokesperson said last week that Prince Philip had been "responding well" to his treatment.
It was earlier said that the royal's admission to hospital for investigation and treatment was a "precautionary measure".
No statement was made on whether or not the Duke will accompany the Queen for the Paralympics Opening Ceremony on August 29.
Prince Philip underwent surgery over Christmas to remove a blockage from a heart artery.