Craigmillar Castle Craigmillar Castle is a ruined medieval castle in Edinburgh , Scotland . It is situated south - east of the city centre , on a low hill to the south of the modern suburb of Craigmillar . It was begun in the late 14th century by the Preston family , feudal baron s of Craigmillar , and extended through the 15th and 16th centuries . In 1660 the castle was sold to Sir John Gilmour , Lord President of the Court of Session , who made further alterations . The Gilmours left Craigmillar in the 18th century , and the castle fell into ruin . It is now in the care of Historic Scotland . Craigmillar Castle is best known for its association with Mary , Queen of Scots . Following an illness after the birth of her son , the future James I of England , Mary arrived at Craigmillar on 20 November 1566 to convalesce . Before she left on 7 December 1566 , a pact known as the " Craigmillar Bond " was made , with or without her knowledge , to dispose of her husband Henry Stuart , Lord Darnley . Craigmillar is one of the best - preserved medieval castles in Scotland . The central tower house , or keep , is surrounded by a 15th - century courtyard wall with " particularly fine " defensive features . Within this are additional ranges , and the whole is enclosed by an outer courtyard wall containing a chapel and a doocot . History . Origins . The lands of Craigmillar were granted to the monks of Dunfermline Abbey by King David I in the 12th century . The Preston family were first granted land in the area by King David II in 1342 and held 2 / 3 of the estate . In a further grant of 1374 , King Robert II gave the remaining lands of Craigmillar to Sir Simon de Preston , Sheriff of Midlothian . It was Simon ' s son , Simon Preston , or his grandson , Sir George Preston , who began work on the tower house which now forms the core of the castle . This was in place by 1425 , when a charter was sealed at Craigmillar by Sir John Preston . The courtyard wall was probably added by Sir William Preston ( d . 1453 ) , who had travelled in France , and drew on continental inspiration for his new work . He also brought back the arm of Saint Giles , which he presented to the High Kirk of Edinburgh , where the Preston Aisle is named for him . In 1480 , John Stewart , Earl of Mar , brother of King James III was held prisoner at Craigmillar , accused of practising witchcraft against the King . 16th century . In 1511 Craigmillar was erected into a barony , and the outer courtyard was built around this time , possibly by another Simon Preston ( d . 1520 ) , Member of Parliament for Edinburgh in 1487 , who had succeeded in 1478 . In September 1517 , during an outbreak of plague in Edinburgh , the infant James V of Scotland moved to safety at Craigmillar . His French guardian De la Bastie had new locks made for his chamber and the two iron gates , and a stable was built for the king ' s mule . The family chapel within the outer court was first recorded in 1523 . In 1544 , during the so - called Rough Wooing of Henry VIII of England , the English attempted to impose , by military force , a marriage alliance between Edward , Prince of Wales , and the young Mary , Queen of Scots . Craigmillar Castle was burned by English troops under the Earl of Hertford . The baron , Sir Simon Preston ( d . 1569 ) had the castle repaired , with domestic ranges in the courtyard being remodelled . Sir Simon served as Lord Provost of Edinburgh for several years , and was a loyal supporter of Queen Mary , who appointed him to her Privy Council . Queen Mary stayed at Craigmillar twice , in September 1563 and from 20 November to 7 December 1566 . She is traditionally said to have slept in the small former kitchen within the tower house , although it is more likely that she occupied larger accommodation in the relatively new east range . On her second stay , Mary was still in poor health following a serious illness in October . Several of her noblemen were with her , and suggested to her that her unpopular husband , Henry Stuart , Lord Darnley , could be removed , either by divorce or by other means . An agreement , the " Craigmillar Bond " , was signed by Mary ' s Secretary of State William Maitland of Lethington , and several nobles including the earls of Bothwell , Argyll and Huntly . The bond does not survive , but set out the conspirator ' s intent to remove Darnley . Although Mary made it clear that she was unhappy with Darnley , she was not part of the conspiracy , and was probably unaware of the plot to kill her husband . It was initially intended that Darnley would lodge at Craigmillar when he returned to Edinburgh , although he opted to stay at Kirk o ' Field in the town , where he was murdered on 10 February 1567 . In 1572 , after Queen Mary ' s flight into England , the Regent Mar used Craigmillar as a base during his siege of Edinburgh Castle , which was being held by supporters of the exiled Queen . King James VI later visited Craigmillar himself , in 1589 , when he was the guest of Sir David Preston . The Gilmours . On the death of Sir Robert Preston in 1639 , Craigmillar passed to a distant cousin , David Preston of Whitehill . His son sold the castle out of the family , and it was bought by Sir John Gilmour ( d . 1671 ) in 1660 , who purchased the neighbouring estate of The Inch at the same time . A Royalist , Gilmour was rewarded following the Restoration of King Charles II , becoming Lord President of the Court of Session in 1661 . He remodelled the west range to provide more modern accommodation in the 1660s , but in the early 18th century , the Gilmours left the castle for Inch House , just west of Craigmillar . The castle was never reoccupied , and formed a romantic feature in the park of the Inch estate . It was ruined by 1775 , when the antiquarian and poet John Pinkerton wrote " Craigmillar Castle : an Elegy " . The castle became a popular tourist attraction from the late 18th century , and was drawn by numerous artists . A proposal to renovate the building for the use of Queen Victoria was put forward in 1842 , but came to nothing . Victoria herself visited the castle in 1886 , and much restoration work was undertaken by its then owner , Walter James Little Gilmour ( d . 1887 ) . Craigmillar Castle has been in state care since 1946 , and is now maintained by Historic Scotland . The castle is a category A listed building , the highest level of protection for a historic building in Scotland , and is also a Scheduled Ancient Monument . The grounds of the castle are included on the " Inventory of Gardens and Designed Landscapes " , the national register of historic gardens . Description . At the core of Craigmillar Castle is the 14th - century L - plan tower house , built on a rocky outcrop . Wrapped around this is the 15th - century courtyard wall , with ranges of buildings at the south - east , east , and west . Beyond the wall is a lower outer wall , enclosing a broad outer courtyard . This contained gardens and a chapel . Further gardens lay to the south , where the outline of a fish pond can be seen . The tower house . The four - storey tower forms the keep of the castle , although it originally stood alone . It measures by , with a projecting wing , or jamb , of by , to the south . The walls are up to thick , and the second and fourth storeys have vaulted ceilings . The tower is built on the edge of a rock outcrop , with the original entrance door protected by a natural cleft in the rock . This would have been spanned by a wooden bridge , until it was filled in when the curtain wall was built . Above the door are the arms of the Preston family . A stair leads up from the entrance to a guard room in the jamb , which would probably have had " murder holes " through which missiles could be dropped on any attackers who gained entry . At ground floor level are cellars , which formerly had a timber loft above . The dividing wall and doors at either end are later additions . On the second floor is the hall , with a kitchen occupying the jamb , and later passages connecting to the east and west ranges . The hall has a large carved stone fireplace of around 1500 , and once had a timber ceiling , probably painted . The kitchen was replaced by a larger one in the 16th - century east range , and converted into a bedroom . A smaller fireplace was inserted into the large kitchen hearth , and larger windows added . The next storey , accessed via a spiral stair , contained a windowless room in the vault above the hall ceiling . Above the kitchen is the lord ' s bedroom , the only original private chamber in the building . The stairs continue to give access to parapet walks around the stone - flagged roof . A further storey was added to the jamb in the sixteenth century , containing a single chamber . The exterior of the castle formerly had two timber balconies , or viewing platforms , one overlooking the gardens to the south , and one looking east across the Lothian countryside . The inner courtyard . The mid - 15th - century curtain wall encloses a courtyard around across , and is up to thick . Externally , the curtain wall measures by . Round towers are located at each corner , with a postern , or side gate , located in the base of the south - east tower . The towers have keyhole - shaped gun holes , intended for decoration as well as defence . The round - arched gate is in the north wall . Over it are the arms of the Preston family , with the royal arms of Scotland above . The walls are defended by machicolation s , spaces through which missiles could be dropped on attackers , and battlement walks give access to the entire length of the wall . On the inside of the wall , traces of windows suggest that there was once a south range of buildings in the courtyard . There is no well in the courtyard , but a stone trough runs through the curtain wall , allowing water to be brought into the castle . The east range . The east range occupies the south - east and east sides of the inner courtyard . The original east range , contemporary with the courtyard wall , was rebuilt in the 16th century and linked to the tower house by a new , broad spiral stair . The building at the south - east adjoins the tower house , and comprises two chambers on the first floor . Cellars below were occupied by a bakehouse and a possible prison . A corridor connects the tower to large , vaulted kitchens in the east range , also accessible via a straight stair from the courtyard . Another depiction of the Preston family arms , supported by monkeys , appears above the door to the east range . Below the kitchens are vaulted cellars , containing a blocked - up postern gate through the courtyard wall . Above , a long gallery occupied the second floor , although only the lower walls of the gallery survive . The west range . The west range was entirely rebuilt by the Gilmours , in the 1660s , to provide a spacious suite of modern accommodation , to suit Sir John ' s position as a senior judge . The ground floor contained a large central drawing room dining room , with large windows , and a carved stone fireplace . This room would also have had plaster ceilings and other decorative features . To the north was a kitchen , and to the south a chamber , with a wine cellar below . The first floor had four bedrooms . Another new stair was built , connecting the west range with the tower house . The door to this tower has a classical pediment , above which is a 20th - century plaque , erected by a descendant of the Gilmours , and bearing the arms of Sir John Gilmour and his wife . The west range is now roofless , the internal floor is also gone , and the large windows have been blocked up . The outer court and gardens . The outer walls , dating from the early - mid 16th century , are smaller and less formidable than the inner walls , but they enclose a much larger area . A round tower at the north - east corner has gun holes and a doocot , or pigeon house , upstairs . The family chapel was built around 1520 , and dedicated to St Thomas Becket . It is now a roofless burial aisle , still used by the Gilmour family . Gardens occupied the east and west parts of the courtyard , with the western terrace overlooked by the large windows of the west range . The barn at the north - west of the courtyard was converted into a Presbyterian church , for the village of Liberton , in 1687 . South of the castle were informal gardens and orchards , with the bases of 16th - century viewing towers remaining at the corners of this drystone - walled enclosure . The former fish pond , shaped like a letter P for Preston , is a nationally - significant archaeological garden feature , due to its rarity . In the 1820s , a plan was drawn up to lay out picturesque landscape gardens between Inch House and the castle , which would have incorporated " Queen Mary ' s Tree " , a Sycamore supposedly planted by Mary , Queen of Scots . Much of the woodland within the castle estate dates from the early to mid 19th century .