Thousands of people watched in near-silence as the Queen's coffin made its journey up the Royal Mile in Edinburgh.
The Queen's children, led by King Charles III, walked behind the hearse as it drove from the Palace of Holyroodhouse to St Giles' Cathedral.
A service of remembrance was then held in the cathedral, where the Queen will lie at rest until Tuesday afternoon.
It is estimated that 20,000 people are in a mile-long queue to pay their last respects.
All four of the Queen's children - King Charles, Princess Anne, and Princes Andrew and Edward - held a vigil for 10 minutes around the coffin of their late mother at the cathedral.
Earlier they had walked behind the hearse, along with Princess Anne's husband, Vice Admiral Sir Tim Laurence.
A car behind them carried Camilla, the Queen Consort, and Sophie, the Countess of Wessex, Prince Edward's wife.
There was a respectful silence from the crowd, which was 10 deep in places, as the procession to the cathedral took place on Monday afternoon.
The quiet was punctuated by the echo of ceremonial gunshots which were fired from Edinburgh Castle every minute.
'The silence lingered'
As the procession edged closer the crowd fell silent and cries of "she's here" were heard.
There was a sea of hands holding phones in the air to try and capture the moment on camera while a barking dog momentarily put the police horses on edge.
From the back of the crowd a cry of "God Save the King" came as the coffin passed the Canons' Gait pub.
The silence lingered for a few moments after the procession had passed as people collected their thoughts.
Police Scotland said a 22 year-old man had been arrested in connection with a breach of the peace after footage appeared to show a man heckling the royal procession on the Royal Mile.
The King had addressed both Houses of Parliament earlier on Monday, before he and the Queen Consort flew to Edinburgh.
He was welcomed on the tarmac by First Minister Nicola Sturgeon, Scottish Secretary Alister Jack and Edinburgh's Lord Provost, Robert Aldridge.
They then travelled to the Palace of Holyroodhouse, where there was applause as the King and the Queen Consort met members of the public.
The monarch spent time shaking hands and also received gifts of flowers.
King Charles then took part in the ancient Ceremony of the Keys, where he was handed the keys to the city by the lord provost.
In keeping with tradition, he handed them back, entrusting their safekeeping to the city's elected officials.
King Charles III also inspected a guard of honour from the Royal Regiment of Scotland.
He then led the procession to St Giles' Cathedral behind the Queen's coffin, which was draped with the Royal Standard in Scotland and dressed with a wreath of flowers.
The cathedral then hosted a service celebrating the Queen's life and her connection to Scotland.
The Rev Calum MacLeod, who led the service, welcomed the Royal family, representatives of "our nation's life" and "people whose lives were touched by the Queen in so many unforgettable ways".
He said: "We gather to bid Scotland's farewell to our late monarch, whose life of service to the nation and the world we celebrate. And whose love for Scotland was legendary."
First Minister Nicola Sturgeon read a lesson during the service, which was also attended by Prime Minister Liz Truss.
Later, Ms Sturgeon - who had an audience with King Charles at Holyrood - paid tribute to the Queen during a motion of condolence in the Scottish Parliament.
She hailed the Queen as "a true and steadfast friend of this parliament" who has been "intrinsic to the story of modern Scotland".
Responding to the motion, King Charles said: "Through all the years of her reign, the Queen, like so many generations of our family before her, found in the hills of this land and in the hearts of its people a haven and a home."
Paraphrasing Robert Burns, he described the Queen as: "The friend of man, the friend of truth, the friend of age and guide of youth.
"Few hearts like hers with virtue warmed, few heads with knowledge so informed."
The monarch also confirmed he was passing his Duke of Rothesay title to Prince William.
Mourners have started filing past the Queen's coffin at St Giles' Cathedral, including while the King and his siblings' stood in vigil on Monday evening.
While the Queen lies at rest at St Giles' Cathedral, her coffin will remain under continuous vigil for 24 hours, guarded by the Royal Company of Archers.
The queue to view the coffin starts at George Square Lane/North Meadow Walk in The Meadows, where wristbands are being issued for entry to the cathedral.
The public have been warned the queue is likely to involve standing for a number of hours.
Mourners are advised to bring their own food and drinks. Toilets will be available and visitors will be able to leave the queue briefly to use the facilities.
There will be airport-style security checks for entering St Giles' at George IV Bridge and certain restrictions will apply on mobile phones, with photography and recording not permitted.
The Royal Household has asked that floral tributes are left at the Palace of Holyroodhouse.
On Tuesday, the Queen's coffin will be flown from Edinburgh Airport to Buckingham Palace.
From Thursday, the Queen will lie in state at Westminster Hall for four days. Her funeral will take place at Westminster Abbey on Monday, 19 September.
Watch: King Charles III leads the procession behind the Queen's coffin in Edinburgh
Watch: Royal Regiment of Scotland place Queen's coffin on the catafalque