Often forgotten in favour of the more famous Edinburgh Castle, Craigmillar is a substantial and historically important ruin, lying only 3 miles (5 km) from the centre of Edinburgh. Although a building existed on this site from the 13th Century, the present fortress dates from the mid-15th century when it was the home for the Preston family. King James V (1512 - 1542) stayed at Craigmillar in 1517. The castle suffered at the hands of the Earl of Hertford during the English invasion of 1544 and Mary, Queen of Scots (1542 - 1587), sought seclusion there after the murder of her secretary David Rizzio (1533 - 1566) at Holyrood Palace. Craigmillar was also where Mary's nobles, including the Earl of Bothwell (1536 - 1578) and William Maitland (1525 - 1573), plotted the demise of her second husband Lord Darnley (1545 - 1567).
In 1660 the castle was bought by Sir John Gilmour, who extended and significantly modernised the property. It was abandoned in the 18th century and given to the nation by the Gilmour family in 1946. It is now maintained by Historic Scotland.