In the middle of the Royal Mile, just to the northwest of St Giles' Cathedral, a heart-shaped arrangement of granite bricks is set distinctively into the cobblestones. This small, unassuming marker is all that physically remains of one of the most significant and feared buildings in Edinburgh’s history: the Old Tolbooth Prison.
For over four hundred years, the Old Tolbooth stood at the very centre of Edinburgh's civic and judicial life. It was at various times the seat of the burgh council, the home of the Scottish Parliament, and the highest court in the land. It’s most infamous role, however, was as the city's main prison, and a place where conditions were abhorrent and torture and execution commonplace.
When it was finally demolished in 1817, Edinburgh breathed a collective sigh of relief. But the building's ghost has never quite left the city. Read on to discover the fascinating history of Edinburgh’s ‘dark heart’ from its origins to the tales of some of its most colourful inmates and its long-lasting legacy.
The Origins of Edinburgh’s Old Tolbooth Prison
The origins of the Tolbooth stretch back at least as far as the 14th century. A charter of 1386 refers to the site of a new 'Bell-House' - a civic building housing the burgh offices, from which the bell would ring to signal the opening of markets and to summon councillors to meetings.
The name 'tolbooth' reflects the building's original commercial function: it was literally a booth for the collection of tolls and the regulation of trade. But over the centuries, as the city of Edinburgh grew and developed, its purposes multiplied.
Major rebuilding took place in 1610-11 and the structure that resulted was a substantial four-story building with a maze of interior rooms accessible from external turnpike stairs.
Its footprint jutted so far into the High Street that at its narrowest point, the road between the Tolbooth and the surrounding tenements was just fourteen feet wide. This footprint is still traced today by brass markers in the High Street cobble stones. It was, by any measure, an imposing physical obstruction and an unmistakable statement of civic authority.

The Tolbooth as Seat of Civic Power
The Old Tolbooth was much more than a prison. For centuries, it was Edinburgh’s most important civic building: the place where the burgh council met, justice was administered, tolls and taxes were collected, and Scotland’s national business was conducted.
Scottish parliamentary business was first recorded there in 1438, and by the later 15th century the Tolbooth had become one of the regular meeting places of the Estates of Parliament. Under James IV, all Scottish parliaments sat there, confirming Edinburgh’s growing role as the effective capital of Scotland.
In 1562, Mary, Queen of Scots, concerned by the poor condition of the old building, ordered Edinburgh’s council to provide new accommodation for Parliament and the courts. This led to a period in which civic, legal and parliamentary business shifted between the Tolbooth and adapted spaces around St Giles’.
By the early 17th century, the Tolbooth was no longer suitable for national government. Parliament House was completed beside St Giles’ in time for the parliamentary session of 1639, and many of the Tolbooth’s higher civic and legal functions moved there.
The Tolbooth was therefore the institutional heart of Edinburgh - which makes Sir Walter Scott’s later name for it, The Heart of Midlothian, both fitting and deeply ironic. It was a centre of civic power, royal authority and national law, but also a place of fear, filth and confinement for those trapped inside as we shall discover...
The Tolbooth as a Prison: Suffering & Squalor
The prison’s history
The Tolbooth’s use as a prison is first recorded in 1480-81, when the building originally created for civic and judicial business began to include dedicated space for confinement.
By the early modern period, it had become Edinburgh’s ‘common jail’: a place where debtors, thieves, murderers, condemned prisoners, political offenders, suspected witches and religious dissenters could all find themselves held under the same roof.

The prison’s layout
The Tolbooth was a vertical maze of cells, staircases and foul air. The ground floor was let out as shops and did not even connect with the jail above. From the first floor and above, men, women and children were locked in rooms with little light, no proper ventilation and almost no sanitation.
The prison made few distinctions between inmates by modern standards. Some prisoners had what was called the “freedom of the prison”, meaning they were not confined to a single room and could move up and down the stairs. These were often debtors or those able to pay for small privileges; some even had their own beds and kept their rooms in tolerable order. Others especially those who were condemned or considered dangerous were shut into individual cells or crowded group apartments.
The building’s layout reflected this grim hierarchy. Later accounts describe felons as confined in the more secure eastern section, while debtors were held in the western part under looser conditions. Debtors could receive visitors and, remarkably, had access to a tavern on the ground floor.
The eastern section consisted of three rooms, one above another. The middle chamber, known as the “iron room”, was intended for prisoners under sentence of death. Its name derived from a long iron bar stretching the length of the room, to which condemned prisoners were chained, allowing them a small degree of movement.
The prison's conditions
The sanitary arrangements in the Tollbooth were almost non-existent. No ventilation, no piped water and no toilets. Human waste was thrown into a hole at the foot of a stair, supposedly connected to a drain, but so blocked that it filled the prison with a disagreeable stench. In such crowded, airless conditions, disease was a constant threat, and prison fever could spread from jails into courtrooms and the wider city.
Lord Cockburn, who remembered the Tolbooth before its demolition in 1817, later described it as a place of “little dark cells” where heavy manacles were the chief security: “airless, waterless, drainless; a living grave.” Him, observed that single week in the Old Tolbooth was worse punishment than a year in the worst modern prison.
Beyond the conditions, physical torture was also routine for much of the building’s history. Common implements included “the boot”, a device forced over the leg and tightened with wedges, and “pilliwinks”, the Scottish term for thumbscrews.

The Gallows Platform: Public Executions at the Tolbooth
From 1785, when the Grassmarket gallows were retired, public executions in Edinburgh moved to a platform constructed on the west gable of the Old Tolbooth itself. The platform projected outwards over the street, allowing crowds to gather below and watch proceedings in full. The positioning was deliberate: the scaffold was in clear view, the condemned visible from a great distance, the ceremony of death conducted in the most public manner possible.
The Tolbooth served as Edinburgh's main execution site until its demolition in 1817, when a temporary structure near the Lawnmarket took over until the practice of public execution was finally abolished in Scotland in 1868.
Notable Prisoners of Edinburgh’s Tolbooth
The list of those who passed through the Tolbooth’s gates reads like a roll-call of Edinburgh’s most turbulent history: smugglers, murderers, debtors, political rebels, religious dissenters, condemned prisoners and those accused of witchcraft all spent time within its walls.
Covenanters
During the Covenanting struggles of the 17th century, the Tolbooth held many prisoners who refused to accept royal authority over the Church of Scotland. Some were later executed in the Grassmarket; others died in confinement. The prison was also part of Scotland’s witch-hunting machinery, holding some of those accused before trial, interrogation or execution.
Accused Witches
The Tolbooth was also bound up with Edinburgh’s persecution of those accused of witchcraft. Under Scotland’s Witchcraft Act of 1563, witchcraft was a capital crime, and Edinburgh’s courts and prisons became part of the machinery that turned accusation into execution.
The North Berwick witch trials of 1590-91, which drew the personal attention of James VI, brought figures such as Agnes Sampson, Geillis Duncan, John Fian and Barbara Napier into Edinburgh’s legal system; records from the Survey of Scottish Witchcraft link some of these proceedings directly with the Old Tolbooth.
Later, Agnes Finnie, an Edinburgh shopkeeper accused of witchcraft and sorcery, was imprisoned in the city Tolbooth for months before her trial and execution in 1645.
Andrew Wilson
Andrew Wilson and his co-accused George Robertson were smugglers whose story helped spark the Porteous Riot of 1736. Condemned to death and held in the Tolbooth, Wilson helped Robertson escape by holding back the guards while his companion fled. Wilson’s sacrifice made him a folk hero. When he was hanged in the Grassmarket on 14 April 1736, the crowd was already dangerously volatile.
John Porteous
Captain John Porteous, commander of the City Guard, soon became the next famous occupant of the condemned cell. Accused of ordering his men to fire on the crowd during Wilson’s execution, he was tried, convicted and sentenced to hang. When a reprieve arrived from London, Edinburgh rioted. On 7 September 1736, a mob stormed the Tolbooth, dragged Porteous from his cell and lynched him in the Grassmarket in what become known as the Porteous Riot - one of the most dramatic acts of mob justice in Scottish history.
Katherine Nairn
Another notorious prisoner was Katharine Nairn, the young wife of Thomas Ogilvie of Eastmiln. In 1765, she and her brother-in-law Patrick Ogilvie were convicted over the poisoning of her husband. Patrick was executed, but Katharine’s sentence was delayed because she was pregnant. After giving birth in the Tolbooth, she escaped, reportedly disguised and aided by her midwife.

Deacon Brodie
The Tolbooth’s most theatrical criminal celebrity was Deacon William Brodie: respectable tradesman by day, burglar by night. A cabinetmaker, town councillor and Deacon of the Incorporation of Wrights, Brodie led a secret double life of gambling and theft which eventually caught up with him. In 1788, he was convicted with George Smith for the attempted robbery of the Excise Office and hanged at the Old Tolbooth on the High Street. His double life escapades inspired his popular association with Dr Jekyll and Mr Hyde.
(Not) William Burke
Although often linked with Edinburgh’s prison history, William Burke of Burke & Hare infamy could never have been held in the Old Tollbooth as the building was demolished a decade before arrest.
Together, the Tolbooth’s prisoners represent the full range of Edinburgh’s darker episodes: religious persecution, witchcraft panic, smuggling, murder, debt, political violence, public execution and spectacular escape. Few buildings in Scotland contained so much fear and within such a cramped space.
Demolition & the Legacy of Sir Walter Scott
By the early 19th century, the Old Tolbooth was both physically and symbolically long past its time. The city was in the midst of the “enlightenment”, the councils had relocated elsewhere, and the building - long described as an 'ugly encumbrance and deformity to the High Street' - was blocking Edinburgh's busiest and most important thoroughfare. In 1817, the demolition crews moved in.
Sir Walter Scott was present at the demolition and made sure that something of the Tolbooth survived. He obtained the great iron entrance door and its key, which he incorporated into the architecture of his newly built mansion, Abbotsford House, near Melrose in the Scottish Borders. The door can still be seen there today. Scott then published The Heart of Midlothian in 1818, the year after the building came down, ensuring that the Tolbooth would live on in literature even as it vanished from Edinburgh’s landscape. The title of Scott's novel gave the Tolbooth its enduring popular nickname.

What Remains of Edinburgh’s Old Tolbooth Today?
The Old Tolbooth itself is long gone, but its presence is still felt at every turn on the Royal Mile. The Heart of Midlothian, the stone heart set into the pavement, marks the entrance to the former prison and is one of Edinburgh's most photographed landmarks. B
rass markers in the surrounding cobblestones tracing the full footprint of the imposing building, allowing you to understand just how much of an obstruction it once was.
Inside Abbotsford House in the Borders, Scott's remarkable home, the original Tolbooth door stands as a tangible relic of the building's existence.
If you want to delve further into Edinburgh's dark heart, Escape The Past's city trails and historical escape rooms immerse you in real episodes from Edinburgh's fascinating past allowing you to experience the city’s historical sights, sounds and stories for yourself!