Sir James Shaw, 1st Baronet (26 August 1764 – 22 October 1843), became Lord Mayor of London in 1805. From humble beginnings in a farming family in Ayrshire, he became a successful merchant and politician; he was a relation of Robert Burns and used his wealth to support Burns's orphaned children. As Lord Mayor of London, he led the funeral procession of Lord Nelson in 1806, having established his right to do so and was created baronet twice, in 1809 and 1813. While later Chamberlain of London, he almost lost his own fortune due to injudicious investments, and died, exonerated, in 1843.
Shaw was born on 26 August 1764, in Riccarton, Kilmarnock, Scotland, the son of a "respectable farmer", John Shaw, whose family had farmed the area of Mosshead for over 300 years, and Hellen Sellars. On the death of his father, the family moved to Kilmarnock, and Shaw studied at the local grammar school.
At the age of 17, he followed his elder brother to America to seek work, returning after three years to take up a position in the same company's London offices and becoming a junior partner in the firm. He became a wealthy merchant and financially assisted the children of Robert Burns after Burns's death in 1796. He was elected alderman for Portsoken in 1798 and became Sheriff of London and Middlesex in 1803.
Shaw had developed a reputation as a "gentleman and a citizen" and was sponsored for the office of Lord Mayor of London by the Scriveners' Company, and became only the second member of that guild to achieve that honour.
Having taken office in 1805, Shaw determined to re-establish the tradition whereby the Lord Mayor took precedence in public processions within the City of London over all except the reigning monarch, and took the opportunity of the funeral of Lord Nelson in 1806 to do so. According to one account, Shaw discussed the matter with the Prime Minister, Lord Liverpool, who was aware that the Prince Regent would be attending the funeral, but did not seem willing to take action. Shaw then offered to visit the King himself at Windsor Castle to resolve the matter, and Liverpool said that he would see what could be done. By the following day, the Royal Warrant of Precedence had been granted, and Shaw duly led the procession.