Dalhousie Castle is a castle in Cockpen parish, Midlothian, Scotland. Dalhousie Castle is situated near the town of Bonnyrigg, 8 miles (13 km) south of Edinburgh. The castle was the seat of the Earls of Dalhousie, the chieftains of Clan Ramsay.
The patriarch of the clan was Simundus de Ramesie (Simon of Ramsey), an English knight of Norman descent from the Huntingdonshire village of Ramsey. Simundus, a vassal of David, Earl of Huntingdon, followed his lord to Scotland in about 1140 when David inherited the Scottish crown. He is considered the founder of the Ramsay clan and the first to have lands at Dalwolsey.
The first castle at Dalhousie was constructed by him. The red stone castle is situated in a strategic spot overlooking the River Esk. The drum tower, oldest part of the current structure, an L Plan Castle dates to the mid 15th century. The majority of the current castle dates to the 17th century. There was originally a dry moat surrounding the castle. The moat was later filled in but partially excavated in the late 20th century.
Dalhousie Castle has seen much history. King Edward I (Longshanks) stayed at the castle on his way to meet Sir William Wallace at the Battle of Falkirk. In 1400, Sir Alexander Ramsay withstood a six-month siege at Dalhousie by English forces led by King Henry IV. Oliver Cromwell used the castle as a base for his invasion of Scotland. Many Earls of Dalhousie have taken an active part in British political and military leadership.