William Brodie (28 September 1741 – 1 October 1788), more commonly known by his prestigious title of Deacon Brodie, was a Scottish cabinet-maker, deacon of a trades guild and Edinburgh city councillor, who maintained a secret life as a burglar, partly for the thrill, and partly to fund his gambling.
By day, Brodie was a respectable tradesman and Deacon (president) of the Wrights which made him a member of the Town Council. Part of his job in building cabinets was to install and repair their locks and other security mechanisms and repair door locks. He also served on a jury. He socialised with the gentry of Edinburgh, and met the poet Robert Burns and the painter Sir Henry Raeburn. He was also a member of The Edinburgh Cape Club.
At night, however, Brodie became a burglar and thief. He used his daytime job as a way to gain knowledge about the security mechanisms of his clients and to copy their keys using wax impressions. As the foremost wright of the city, Brodie was asked to work in the homes of many of the richest members of Edinburgh society. He used the illicit money to maintain his second life, including five children, two mistresses who did not know of each other, and a gambling habit. He reputedly began his criminal career around 1768 when he copied keys to a bank door and stole £800. In 1786 he recruited a gang of three thieves, Brown, Smith, and Ainslie.
Capture and Trial 
The case that led to Brodie's downfall began later in 1786 when he organised an armed raid on an Excise office in Chessel's Court on The Canongate. Brodie's plan failed and Ainslie was captured. Ainslie agreed to turn King's evidence, to avoid transportation, and informed on the rest of the gang. Brodie escaped to the Netherlands intending to flee to the United States but was arrested in Amsterdam and shipped back to Edinburgh for trial.
The trial started on 27 August 1788. At first there was no hard evidence against Brodie before the tools of his criminal trade were found in his house; copied keys, a disguise and pistols. The jury found Brodie and his henchman George Smith, a grocer, guilty. Smith was an English locksmith responsible for a number of thefts, even stealing the silver mace from the University of Edinburgh.
Brodie and Smith were hanged at the Tolbooth on 1 October 1788, using a gallows Brodie had designed and funded the year before. According to one tale, Brodie wore a steel collar and silver tube to prevent the hanging from being fatal. It was said that he had bribed the hangman to ignore it and arranged for his body to be removed quickly in the hope that he could later be revived. If so, the plan failed. Brodie was buried in an unmarked grave at the Buccleuch Church in Chapel Street. The ground is now covered by a car park behind university lecture-halls. However rumours of his being seen in Paris circulated later and gave the story of his scheme to evade death further publicity.
Popular culture 
Popular myth holds that Deacon Brodie built the first gallows in Edinburgh and was also its first victim. Of this William Roughead in Classic Crimes states that after research he was sure that although the Deacon may have had some hand in the design "...it was certainly not of his construction, nor was he the first to benefit by its ingenuity".
The dichotomy between Brodie's respectable façade, and his real nature inspired Robert Louis Stevenson to write The Strange Case of Dr Jekyll and Mr Hyde. Stevenson's father had furniture made by Brodie.
Deacon Brodie is commemorated by a pub of that name on Edinburgh's Royal Mile, on the corner between the Lawnmarket and Bank Street which leads down to The Mound, and an alleyway off the Royal Mile, which contained his family residence, still bears the name 'Brodie's Close'. There is also a pub in Ward Road, Dundee named after him. A pub in New York City carrying his name sits on the south side of the famous west side 46th Street Restaurant Row between 8th Avenue and 9th Avenue, closer to 9th Avenue.