Edinburgh Castle History: 3,000 Years in One Guide

Edinburgh Castle history

Edinburgh Castle has been besieged at least 26 times — more than any other place in Britain. The volcanic rock it sits on has been a fortified site for over 3,000 years. And unlike most historic castles, this one isn’t a ruin: it’s still garrisoned, still evolving, and still at the heart of Scottish national identity.

This is the full Edinburgh Castle history, from Iron Age hill fort to Scotland’s most visited attraction. I’ve connected every era to what you can actually see when you walk through the gates — because the best thing about this castle is that 3,000 years of royal drama, siege warfare, and political intrigue are layered into stones you can touch.

Edinburgh Castle stands on Castle Rock, occupied since at least 1000 BC. The first royal castle dates to Malcolm III (11th century). Its oldest surviving building is St Margaret’s Chapel (c. 1130). The castle has endured 26 sieges, served as royal residence, garrison, prison, and treasury, and now draws over 2 million visitors a year. A guided history tour (£37) brings three millennia of stories to life.

Key Dates: Edinburgh Castle Timeline

Before diving into the full story, here’s a scannable timeline of the moments that shaped this fortress. Every one of these events left a mark you can still see today.

DateEvent
c. 1000 BCIron Age people build a hill fort on Castle Rock
c. AD 600Din Eidyn — Gododdin warriors feast here before riding to their deaths in battle
AD 638Angles capture the fortress; “Edin” becomes Edinburgh
1093Queen Margaret dies in the castle; later canonised as Saint Margaret
c. 1130David I builds St Margaret’s Chapel — Edinburgh’s oldest surviving building
1296Edward I of England captures the castle after a three-day bombardment
1314Thomas Randolph recaptures the castle in a daring night raid; Bruce orders demolition
1440The Black Dinner — teenage Douglas earls executed at a royal banquet
1457Mons Meg, the six-tonne cannon, arrives as a gift from the Duke of Burgundy
1511James IV completes the Great Hall
1566Mary Queen of Scots gives birth to James VI in the Royal Palace
1571–1573The Lang Siege destroys most medieval structures
1603James VI unites the Scottish and English crowns; castle ceases to be a royal residence
1745Final siege — Jacobite forces fail to capture the garrison
1818Sir Walter Scott rediscovers the Honours of Scotland (Crown Jewels)
1829Mons Meg returned from the Tower of London
1861One O’Clock Gun fired for the first time
1927Scottish National War Memorial dedicated
1996Stone of Destiny returned to Scotland after 700 years
TodayScotland’s most visited paid attraction, over 2 million visitors annually

Ancient Origins: Castle Rock Before the Castle

Castle Rock itself is far older than any human construction on it. The volcanic plug formed roughly 350 million years ago and was then sculpted by glaciers into the distinctive crag-and-tail formation you can see from the battlements today — the castle sits on the crag, and the Royal Mile runs down the tail.

The earliest evidence of human occupation dates back around 3,000 years to the late Bronze Age or early Iron Age, when people first recognised the rock’s defensive potential: near-vertical cliffs on three sides, with only one viable approach from the east.

By around AD 600, the Gododdin — a Celtic tribe — had established a fortress they called Din Eidyn. The epic poem Y Gododdin, one of the oldest works in British literature, describes warriors feasting in this stronghold for a full year before riding south to fight the Angles at Catterick. They rode to their deaths. In AD 638, the Angles under Oswald of Northumbria captured the fortress, and “Edin” eventually became Edinburgh.

Stand on the battlements today and you’re looking at the same strategic landscape those Iron Age defenders chose. Arthur’s Seat, the Firth of Forth, the approach road from the east — nothing about the basic geography has changed.

Royal Fortress: From Malcolm III to David I

The castle’s recorded history as a royal residence begins with Malcolm III (reigned 1058–1093), known as Malcolm Canmore. He established the first documented royal castle on Castle Rock, and it quickly became the centre of Scottish royal power.

Malcolm’s wife, Queen Margaret, was deeply devout and transformed the Scottish court. She died in the castle in November 1093, just days after learning that Malcolm had been killed in battle at Alnwick. According to tradition, her body was smuggled from the castle through a foggy postern gate (now called the Fog Gate) while hostile forces surrounded the fortress. She was later canonised as Saint Margaret of Scotland.

Their son David I (reigned 1124–1153) built St Margaret’s Chapel around 1130 in honour of his mother. It’s a tiny Romanesque chapel on the highest point of Castle Rock, and it’s the oldest surviving building in Edinburgh — nearly 900 years old. It still hosts weddings and christenings today.

David also transformed Edinburgh into a seat of royal governance. The castle became Scotland’s chief stronghold: royal residence, treasury, arsenal, and national archive all in one.

What You Can Still See: St Margaret’s Chapel — Edinburgh’s oldest building, still consecrated and hosting ceremonies.

Wars of Independence: Scotland’s Most Besieged Castle

Research carried out in 2014 identified 26 sieges in Edinburgh Castle’s 1,100-year recorded history, earning it the title of the most besieged place in Great Britain and one of the most attacked in the world. The Wars of Scottish Independence (1296–1357) account for the most brutal chapter.

In March 1296, Edward I of England — the same king who stole the Stone of Destiny — marched on Edinburgh and unleashed a three-day bombardment with trebuchets. The castle fell, and Edward garrisoned it with 350 English knights. Scottish royal records, treasures, and the Stone of Scone were hauled off to England.

For 18 years, the English held the castle. Then came one of the most daring raids in Scottish military history. In 1314, Thomas Randolph, Earl of Moray and nephew of Robert the Bruce, led just 30 men in a night raid up the near-vertical north face of Castle Rock. One of Randolph’s soldiers knew a hidden path — he’d used it to secretly visit a lover in the town below. They scaled the cliffs, scrambled over the walls before the garrison could react, and recaptured the castle.

Bruce then ordered the castle demolished to prevent the English from using it again. Only St Margaret’s Chapel was spared — which is why it remains the oldest building on the site. Between 1335 and 1341, the English captured the ruins and the Scots took them back again. The pattern of destruction and rebuilding defined this era and explains why so few medieval structures survive.

Dark Deeds and Royal Drama: The 15th and 16th Centuries

If the Wars of Independence were about national survival, the centuries that followed were about power, betrayal, and blood within Scotland itself. Four stories from this era still resonate inside the castle walls.

The Black Dinner (1440)

In November 1440, 16-year-old William Douglas, 6th Earl of Douglas, and his younger brother David were invited to dine with 10-year-old King James II at Edinburgh Castle. The real power behind the invitation was Chancellor William Crichton, who wanted to crush the Douglas clan’s growing influence.

As the meal progressed, a black bull’s head was placed on the table — a symbol of death. Guards dragged the Douglas brothers out and executed them on trumped-up charges, right in front of the child king. This event took place in David’s Tower, and if the story sounds familiar, it’s because George R.R. Martin has confirmed it as one of the inspirations for the Red Wedding in Game of Thrones.

Mons Meg Arrives (1457)

James II had a passion for artillery — a passion that would eventually kill him. In 1457, he received Mons Meg as a gift from Duke Philip the Good of Burgundy. This six-tonne siege cannon, forged in Mons (now Belgium) in 1449, could hurl 150-kilogram gunstones over three kilometres. It was cutting-edge military technology.

In 1460, James had Mons Meg hauled 80 kilometres to the siege of Roxburgh Castle — a task so enormous that even a team of oxen couldn’t move it more than five kilometres a day. Tragically, James was killed at that siege when a different cannon exploded beside him. Mons Meg’s barrel eventually burst in 1681, and the cannon spent 75 years at the Tower of London before being returned to Edinburgh in 1829 after a campaign led by Sir Walter Scott.

The Great Hall (1511)

James IV was one of Scotland’s most ambitious kings. He completed the Great Hall in 1511, giving the castle a magnificent space for banquets and state occasions. The hall’s hammerbeam roof — still the original — is one of the finest surviving medieval roofs in Scotland. James had already hosted Scotland’s first fireworks display at the castle in 1507, during a jousting tournament. But he had barely two years to enjoy his new hall: in 1513, he was killed at the Battle of Flodden, fighting English forces sent by his own brother-in-law, Henry VIII.

Mary Queen of Scots and the Birth of a King (1566)

In June 1566, Mary Queen of Scots gave birth to the future James VI in a tiny chamber in the Royal Palace. She had retreated to the castle’s safety after the brutal murder of her secretary David Rizzio just months earlier. Above the door to the Royal Palace, you can still see the gilded initials MAH — for Mary and her second husband, Henry Stewart, Lord Darnley.

James would become king of Scotland at just 13 months old after Mary’s forced abdication. In 1603, when Elizabeth I of England died without an heir, James united the crowns of Scotland and England — the event that would change Edinburgh Castle’s role forever.

Hear The Stories: A Guided History Tour (£37) brings the Black Dinner, Mary’s story, and 3,000 years of drama to life through expert storytelling — plus entry to the castle and free time to explore afterwards.→ Book Guided History Tour — £37

The Lang Siege and Aftermath (1571–1573)

The Lang Siege was the longest and most destructive siege in Edinburgh Castle’s history. After Mary Queen of Scots was forced to abdicate in 1567, a group of loyalists held the castle in her name for nearly two years. Sir William Kirkcaldy of Grange, the castle’s captain, refused to surrender to the forces supporting the infant James VI.

Both sides had artillery by this point, and the bombardment was devastating. English reinforcements arriving with 27 additional cannons finally broke the siege in May 1573. The medieval defences — including David’s Tower, the castle’s great entrance fortress — were reduced to rubble.

The rebuilding that followed created much of the castle we see today. The distinctive Half-Moon Battery was constructed around the remains of David’s Tower (you can still see the ruins of the original tower in the foundations below). The Portcullis Gate replaced the wrecked Constable’s Tower. Very few structures on the site pre-date this siege, which is why St Margaret’s Chapel, the Great Hall, and the Royal Palace are so remarkable — they’re the survivors.

The last monarch to stay overnight in Edinburgh Castle was Charles I, in 1633. After that, the castle’s centuries-long role as a royal home was over.

What You Can Still See: Mons Meg cannon — outside St Margaret’s Chapel, where it’s sat since 1829. The Great Hall — still with its original 1511 hammerbeam roof. The Royal Palace — including Mary Queen of Scots’ tiny birthing chamber.Gilded MAH initials above the Royal Palace door.

Military Garrison, Prisoners, and Jacobite Risings

After James VI united the crowns in 1603, Edinburgh Castle was no longer a royal residence. Instead, it evolved into one of Britain’s most important military garrisons — a role it still holds today.

The Jacobite risings of the 17th and 18th centuries brought three more sieges. In 1689, the Duke of Gordon held the castle for the deposed James VII against 7,000 troops, surrendering after three months when supplies ran out. In 1715, a Jacobite raiding party attempted to scale the castle walls under cover of darkness — but the ladder they brought turned out to be too short. The attempt failed, and the deserters within the garrison were hanged.

The final siege came in 1745, when Bonnie Prince Charlie’s forces occupied Edinburgh during the ‘45 Rising. The city fell easily, but the castle garrison held firm. The Jacobites failed to breach the defences, and after the defeat at Culloden the following year, captured Jacobite leaders found themselves imprisoned inside the very castle they’d failed to take.

Between 1757 and 1814, the vaults below Crown Square were used to hold hundreds of prisoners of war — French, American, and Dutch sailors and soldiers. You can still see graffiti scratched into the walls by prisoners, along with evidence of their daily lives and attempted escapes. The New Barracks, built during the Napoleonic Wars to house 600 troops, remain in military use today. And in 1747, a military surveyor named William Roy set up a drawing office in the castle that would eventually become Ordnance Survey — the UK’s national mapping agency.

What You Can Still See: Prisons of War exhibition — original vaults with prisoner graffiti and daily-life recreations.New Barracks — built during the Napoleonic Wars, still garrisoned today. Dog Cemetery — where regimental mascots and soldiers’ pets are buried.

Rediscovery and Restoration: The Castle Reborn

The 19th century transformed Edinburgh Castle from an active military stronghold into a national monument. The catalyst was Sir Walter Scott.

In 1818, Scott led an official search for the Honours of Scotland — the Scottish Crown Jewels that had been locked in a chest in the Royal Palace and virtually forgotten for over a century. He found them: the crown, sceptre, and sword of state, the oldest set of Crown Jewels in Britain. The discovery electrified the nation and sparked a wave of interest in Scotland’s heritage.

Four years later, King George IV visited Edinburgh Castle in 1822 — the first reigning monarch to set foot there since Charles II in 1651. In 1829, Mons Meg was returned from the Tower of London with a military escort, cavalry and infantry accompanying the cannon from Leith Docks to Castle Rock. St Margaret’s Chapel was “rediscovered” in 1845 after years of use as a storage room. Major restoration work funded by Edinburgh publisher William Nelson transformed the castle through the 1880s.

The 20th century added new layers of meaning. The Scottish National War Memorial was dedicated in 1927, built into the castle’s Crown Square. The Stone of Destiny was returned from Westminster Abbey in 1996 after 700 years in England [VERIFY: now relocated to Perth Museum in 2024 — check current display status]. The Edinburgh Military Tattoo has taken place on the Castle Esplanade every August since 1950.

Edinburgh Castle opened to the public in 1910 and is managed by Historic Environment Scotland. It drew over 2.2 million visitors in 2019, making it Scotland’s most visited paid attraction. And it remains one of the very few ancient castles in Britain that still maintains an active military garrison — a living link to 1,000 years of continuous military occupation.

What You Can Still See: Honours of Scotland — Crown Room display (currently closed until April 2026 for refurbishment).One O’Clock Gun — fired daily (except Sundays) since 1861.Scottish National War Memorial — Crown Square.Military Tattoo — Castle Esplanade every August.

Frequently Asked Questions

How old is Edinburgh Castle?

Castle Rock has been occupied for at least 3,000 years, with Iron Age hill forts dating to around 1000 BC. The first recorded royal castle dates to Malcolm III in the 11th century. The oldest surviving building is St Margaret’s Chapel, built around 1130. Most current structures date from after the Lang Siege of 1571–1573.

Who built Edinburgh Castle?

No single person built Edinburgh Castle. Iron Age tribes first fortified the site. King Malcolm III established the royal castle in the 11th century. David I built St Margaret’s Chapel (c. 1130), James IV added the Great Hall (1511), and the castle was substantially rebuilt after the destructive Lang Siege of the 1570s. Historic Environment Scotland now manages the site.

How many times has Edinburgh Castle been besieged?

At least 26 times according to research published in 2014, making it the most besieged place in Great Britain. The most turbulent period was during the Wars of Scottish Independence (1296–1357). The last siege was the Jacobite attempt in 1745.

Was Edinburgh Castle ever destroyed?

Yes, substantially — twice. In 1314, Robert the Bruce ordered it demolished after recapturing it from the English, sparing only St Margaret’s Chapel. The Lang Siege of 1571–1573 destroyed most remaining medieval structures. The castle you see today was largely rebuilt after those events.

Why is Edinburgh Castle important?

Edinburgh Castle is the most besieged place in Britain, a former royal residence and seat of government, home to the Honours of Scotland (Britain’s oldest Crown Jewels), and part of the Edinburgh World Heritage Site. It has served as royal residence, military fortress, arsenal, treasury, national archive, mint, and prison across more than 1,000 years. Today it’s Scotland’s most visited paid attraction.

What is the Black Dinner at Edinburgh Castle?

In 1440, 16-year-old William Douglas and his brother were invited to dine with young King James II at Edinburgh Castle. During the meal, a black bull’s head was placed on the table as a death signal, and the brothers were dragged out and executed. George R.R. Martin cited this event as an inspiration for the Red Wedding in Game of Thrones.

Can you see where Mary Queen of Scots gave birth?

Yes. The tiny birthing chamber where Mary gave birth to James VI in June 1566 is in the Royal Palace, accessible with any Edinburgh Castle ticket. The gilded initials MAH (Mary and Henry) are still visible above the door.

Is Edinburgh Castle still used by the military?

Yes. Edinburgh Castle remains an active military garrison, one of the few ancient castles in Britain with a continuous military presence. The New Barracks, built during the Napoleonic Wars, are still in use. The castle also houses three military museums and the Scottish National War Memorial.

Bring 3,000 Years to Life

Edinburgh Castle isn’t a museum about history — it is history. Every chapel, battlement, and vault you walk through represents a different chapter in 3,000 years of warfare, royal drama, and national identity. St Margaret’s Chapel survived because Bruce ordered it spared. The Half-Moon Battery exists because the Lang Siege destroyed what came before. The Crown Jewels sit in the Royal Palace because Walter Scott refused to let them be forgotten.

A guided history tour is the best way to connect the stories to the stones. You’ll hear expert storytelling about sieges, murders, royal births, and military engineering — then get free time to explore the museums, vaults, and panoramic views at your own pace.

────────────────────────────────────────────────────────────

Related Articles:

Edinburgh Castle Highlights

The Honours of Scotland (crown-jewels)

Compare Edinburgh Castle Guided Tours

Edinburgh Castle Tickets & Prices

────────────────────────────────────────────────────────────

Photo of author
Researched & Written by
Jamshed is a versatile traveler, equally drawn to the vibrant energy of city escapes and the peaceful solitude of remote getaways. On some trips, he indulges in resort hopping, while on others, he spends little time in his accommodation, fully immersing himself in the destination. A passionate foodie, Jamshed delights in exploring local cuisines, with a particular love for flavorful non-vegetarian dishes. Favourite Cities: Amsterdam, Las Vegas, Dublin, Prague, Vienna