Police Scotland had arrested him in connection with a breach of the peace.
It happened while King Charles led senior members of the Royal Family to St Giles’ Cathedral in Edinburgh – following behind a hearse carrying the Queen’s coffin.
A statement added: “He was released on an undertaking to appear at Edinburgh Sheriff Court at a later date and a report will be sent to the Procurator Fiscal.”
No other arrests have been made in relation to the incident, and police would not confirm if any inquiries were ongoing.
During the procession, the Queen’s coffin was taken from the Palace of Holyroodhouse to the cathedral.
The King led the Duke of York, Earl of Wessex and the Princess Royal and her husband Vice Admiral Sir Tim Laurence on foot, while the Queen Consort and the Countess of Wessex followed in cars.
The Queen’s children and a congregation drawn from all areas of Scottish society then attended a service of thanksgiving for her life.
Her coffin has been lying in rest since yesterday afternoon – and will leave Scotland for the final time later today as a poignant journey to Buckingham Palace begins.
Read More: Man charged after Prince Andrew heckled during royal procession