Edinburgh Castle rises from Castle Rock at the western end of the Old Town, its position above the city as important to its history as its buildings. Human occupation of the rock dates back at least to the Iron Age, but the castle’s recorded story reaches us through fragments, later chronicles and the surviving fabric of a fortress repeatedly altered by war. It served Scottish kings, endured sieges and became a military garrison; today it is both a visitor attraction and a place of national remembrance.
A stronghold before the surviving castle
Castle Rock is the hard volcanic plug left after an extinct volcano eroded away. Its steep cliffs to the north, west and south made it naturally defensible, while the gentler eastern approach from the town could be fortified. The rock’s height and narrow access offered a military advantage, but its geology also created a persistent practical problem: water was difficult to secure, especially during droughts and sieges.
Archaeological evidence points to occupation in the Iron Age and later periods, although it does not establish the exact nature or scale of the earliest settlement. The Welsh poem Y Gododdin, dating to around the sixth century, refers to Din Eidyn, generally understood to mean the stronghold of Eidyn. It tells of the Gododdin’s defeat in battle. A separate Irish annal records the Angles besieging “Etin” in 638. These early references suggest a significant fortified place, but they do not provide a continuous account of a castle on the site.
The first documentary reference to a castle there comes from a much later chronicle. John of Fordun, writing in the fourteenth century, described Malcolm III’s widow, Margaret, residing at the Castle of Maidens after the king’s death in 1093. The near-contemporary account of Margaret’s life does not mention a castle, so the detail should be read with that difference in the evidence in mind. What is clear is that, under Malcolm III and his sons, Edinburgh became an important royal centre. King David I, who reigned from 1124 to 1153, held an assembly of nobles and churchmen at the castle and developed the city as a seat of royal power.
Royal residence, contested prize
St Margaret’s Chapel, built during David I’s reign and dedicated to his mother, is the oldest surviving building in the castle and Edinburgh. Unlike the later fortress around it, the small chapel survived the destruction ordered by Robert the Bruce in 1314, when he sought to prevent the English from retaking the castle. Its survival gives a rare, tangible connection to the site’s early royal history.
Control of Edinburgh Castle shifted repeatedly during the Wars of Scottish Independence. Edward I of England took it in 1296 after a three-day bombardment. In March 1314, Thomas Randolph, Earl of Moray, led a surprise attack that recaptured it for the Scots. Later, English forces again occupied the fortress before William Douglas, Lord of Liddesdale, retook it in 1341. The castle’s strategic value made possession of it a prize in the wider struggle over Scotland’s sovereignty.
In the later Middle Ages it developed as both a royal residence and a centre of government. David II began building David’s Tower in the fourteenth century; it was completed under Robert II. The royal apartments and the Great Hall took shape in the fifteenth and early sixteenth centuries. At the same time, the castle became an important arsenal and gun foundry. The large bombard Mons Meg arrived in 1457, and Scottish guns were cast there. As monarchs increasingly favoured the Palace of Holyroodhouse, about a mile away, the castle’s residential role declined. The last reigning monarch to stay there was Charles I, in 1633.
Sieges, garrison and changing purpose
The Union of the Crowns in 1603, when James VI of Scotland also became James I of England, did not end the castle’s military importance. Nor did the parliamentary union of 1707 erase its specifically Scottish history. In the seventeenth century, the castle was caught up in conflict between royalists and Covenanters, and later fell to Oliver Cromwell’s forces after a siege. After the Restoration of Charles II, it became a permanent garrison fortress, a role that continued until the Army moved to Redford Barracks in 1923.
The castle also held prisoners of war and people imprisoned for political or religious reasons. Its vaults were used to confine prisoners during conflicts including the Seven Years’ War, the American War of Independence and the Napoleonic Wars. A mass escape in 1811 helped end the use of the vaults as a prison. The site began to take on a different public role as a national monument. In 1818, with permission to search the castle, Sir Walter Scott found the Honours of Scotland—crown, sceptre and sword of state—in a sealed room. They went on public display. St Margaret’s Chapel, long used for other purposes, was rediscovered in 1845 and restored soon afterwards.
The Jacobite risings tested the fortress again. In 1715, an attempt to scale its walls failed. During the rising of 1745, Jacobite forces captured Edinburgh but could not take the castle. Its guns were used against Jacobite positions in the town, and the attempted blockade was abandoned. These episodes show the difference between control of the city and control of the rock: the castle remained a government stronghold even when the capital fell.
Military history is also commemorated within the walls. The Scottish National War Memorial, opened in 1927, honours Scottish soldiers and those serving with Scottish regiments who died in the two world wars and later conflicts. Rolls of Honour held there record those killed. The National War Museum presents aspects of Scotland’s military history, while regimental headquarters and museums preserve the castle’s continuing, largely ceremonial and administrative, connection with the Army.
A landmark in use
Today the castle is owned by the Scottish Ministers and is cared for and operated principally by Historic Environment Scotland, with the Army retaining responsibility for some areas. Its role as a visitor attraction sits alongside its conservation, memorial and military functions. Within the Royal Palace, the Crown Room displays the Honours of Scotland. The Stone of Scone, on which Scottish monarchs were traditionally crowned, returned to Scotland in 1996 and is also kept there.
The annual Royal Edinburgh Military Tattoo brings performances to the Esplanade, the broad forecourt in front of the entrance. The event began in 1950 and grew from a military parade into a programme featuring performers from Scotland and around the world. The castle also retains a daily time signal in the One O’Clock Gun, fired from Mills Mount Battery except on Sundays and certain public holidays. Established in 1861 to give ships in the Firth of Forth a time signal, it has become a familiar public ceremony.
The castle’s setting and silhouette have made it a widely recognised symbol of Edinburgh and Scotland. It features in civic and institutional emblems and appears on Scottish banknotes and postage stamps. It stands within the Old and New Towns of Edinburgh World Heritage Site, which UNESCO inscribed in 1995; the castle is a defining part of that wider historic landscape. Its significance is not simply scenic: the fortifications, palace, chapel, museums and memorials hold evidence of changing power, conflict and remembrance.
Why Edinburgh Castle deserves a place in British Legacy
Edinburgh Castle deserves a place in British Legacy because its story makes Scotland’s place in the wider history of Britain visible without reducing Scottish history to a general story of union. The fortress was a centre of royal government, a contested stronghold in the Wars of Independence and a military installation through centuries of political change. Its history records both the repeated assertion of Scottish authority and the changing relationship between Scotland and its neighbours. The Union of the Crowns and the union of 1707 belong to that story, but so do the castle’s Scottish regalia, its role in national conflicts and its place in the capital’s identity.
Its importance also lies in the uses that have endured or grown beyond its military purpose. The Honours of Scotland and Stone of Scone connect visitors with Scottish monarchy and ceremony; St Margaret’s Chapel preserves an early medieval building; the War Memorial gives public form to remembrance; and the Tattoo makes the Esplanade a stage for military music and international performance. These are distinct forms of heritage, gathered in one working historic site. The castle’s conservation and public interpretation allow people to encounter that history in place, while its continuing ceremonial and administrative links with the Army recall its long garrison role. Edinburgh Castle is therefore not merely an image of Scotland: it is a complex record of how the country’s power, memory and public life have changed.
Sources
Adapted in part from Edinburgh Castle by Wikipedia contributors, under CC BY-SA 4.0. Text has been edited and combined with the existing article; this adapted text is shared under the same licence. Contributor history.

