The body of Elizabeth II had been lying in rest in its oak coffin overnight in the city’s St Giles’ Cathedral.
Tens of thousands of people had paid their last respects there, with demand to come so high that the queue had to be closed after noon.
Meanwhile, people packed into the historic streets of the city for the third day in a row to see the coffin leave the cathedral.
Carried out of the church to the sound of a lone piper, the hearse carrying the Queen’s coffin then departed for Edinburgh Airport.
As it did, the crowd, who had gathered in numbers in the late afternoon sunshine, burst into applause.
The Princess Royal, accompanied by her husband Vice Admiral Sir Tim Laurence, travelled behind her late mother in a separate car.
Her journey mirrored that she made on Sunday, when she again travelled behind her mother as the Queen was brought down to the capital from Balmoral – where she had died peacefully on Thursday.
Honeymooners Steven and Elizabeth McCrite, from Orlando, Florida, were among those who paid their respects to the Queen during the period of lying in rest.
Mrs McCrite, 22, commented: “It’s a once-in-a-lifetime thing, we’re not going to be able to do it again.”
Support worker Bethany Walker, 21, said she came straight from her nightshift to queue to pay her respects to the Queen.
“It’s a historic event and we want to be there. It’s part of the history books,” she said.
Duncan Wilson Paisley came from Stirlingshire wearing full Highland dress to pay his respects.
Mr Wilson Paisley served in the Royal Highlanders for 25 years and said he felt a particular “gratitude”to the Queen.
“She was a wonderful lady for whom everybody has the utmost respect,” he said.
However, as people came to the centre of Edinburgh to pay their respects, some came to protest against arrests that have been made
Police Scotland have charged two people after two incidents during the commemorations, resulting in activists gathering outside St Giles’ Cathedral carrying “blank canvases”.
Douglas Rogers, 27, said he was taking part to “stand in solidarity with those who have been arrested protesting the monarchy”.
Edinburgh has been the focal point for events in Scotland to commemorate the life of Queen Elizabeth.
Following the monarch’s death last Thursday, her body was transported to the Scottish capital on Sunday, lying at the Palace of Holyroodhouse before being taken to St Giles’ Cathedral on Monday.
There was a thanksgiving service at the church on Monday, attended by the King and other members of the royal family, before a motion of condolence was taken in the Scottish Parliament.
The new King then returned to St Giles’ together with the Princess Royal, the Duke of York and the Earl of Wessex, where they stood in silence in a vigil beside their mother’s coffin.