Roslin Castle Roslin Castle ( sometimes spelt Rosslyn ) is a partially ruined castle near the village of Roslin in Midlothian , Scotland . It is located around 9 miles south of Edinburgh , on the north bank of the North Esk , only a few hundred metres from the famous Rosslyn Chapel . There has been a castle on the site since the early 14th century , when the Sinclair family , Earls of Caithness and Barons of Roslin , fortified the site , although the present ruins are of slightly later date . Following destruction during the War of the Rough Wooing of 1544 , the castle was rebuilt . This structure , built into the cliffs of Roslin Glen , has remained at least partially habitable ever since . The castle is accessed via a high bridge , which replaced an earlier drawbridge . Roslin was renovated in the 1980s and now serves as holiday accommodation . History . The first castle at Roslin was built in the 1330s for Henry Sinclair , Earl of Orkney . The Sinclair , or St Clair , family ( also anciently spelt Sanctclare ) , were of Norman origin , and had held land in the Lothian s since 1162 . It was built on a rocky promontory near the site of the Battle of Roslin , where the Scots defeated the English in 1303 . In the late 14th or early 15th century , Henry ' s son Henry , 2nd Earl of Orkney built a new rectangular , round - cornered keep at the south - west corner . The courtyard was entered via a drawbridge over an artificial ditch , giving access to a pend in the small north range . The castle was damaged by a domestic fire in 1452 . It was a scriptorium during the Middle Ages , and five St Clair manuscripts , dating back to 1488 , are in the National Library of Scotland . These include the Rosslyn - Hay manuscript , believed to be the earliest extant work in Scots prose . Legend has it that during the domestic fire the Earl was in consternation because of his valuable manuscripts but they were lowered to safety from a window by his chaplain . Roslin was more severely damaged by the Earl of Hertford , who burned the castle during the War of the Rough Wooing in 1544 . The keep was almost totally destroyed , although its one remaining ruined wall can still be seen . The castle was rebuilt in the late 16th century . A new five - storey east range was built into the side of the rock , and the gatehouse was rebuilt , this time with a permanent stone bridge . The upper part of the east range was renovated in 1622 , with renaissance details and carving to door and window surrounds . Roslin suffered again from the artillery of Cromwell ’ s commander in Scotland , General Monck , in 1650 . It was further damaged by a Reforming mob in 1688 . By the 18th century the structure was dilapidated , though part of the east range has always remained habitable . From 1982 to 1988 the east range was restored by architects Simpson and Brown . The current owner , the Earl of Rosslyn , a descendant of the Sinclairs , leases the castle as holiday accommodation via the Landmark Trust . The castle is a Scheduled Ancient Monument , and a Category A listed building . Architecture . The castle stands precipitously above a loop of the River North Esk , which protects it on three sides . This rocky promontory was breached on the north side to form a ditch giving further protection . The castle is approached from Roslin across this ditch , via a precipitous bridge and through the ruined gatehouse . Ruins . The remains of the gatehouse and north range comprise only fragments of walls and one side of the entrance arch , with the remains of a bartizan above . Along the west side of the castle , the 15th - century curtain wall remains standing to a considerable height . This section of wall has six openings at the base , one of which served as a postern gate . On the outer face , the six bays are divided by rounded buttress es . Old sketches of Roslin show bartizans above each of these buttresses , with a wall - walk connecting them . To the south of this wall is the remaining wall of the keep . The mound beneath is formed from the collapsed remnants of the other three walls . The ruin suggests that the keep was around 16m by 12m , with walls 2 . 9m thick rising to a machicolated parapet . East range . The restored east range measures around 31m by 10m , with a pitched roof and crow - step gables . It is entered through a richly carved doorway , dated 1622 and initialled SWS for Sir William Sinclair , which gives access to the third floor . The three lower floors are cut into the rock , and each has four vaulted rooms , with a fifth in the south - east tower . These lower levels were used for service rooms , with the principal rooms in the two upper floors . At the lowest level was a kitchen , with a bakehouse above . On the exterior , gunloops are found on the south wall , with several shot - holes on the east . All five floors are connected by a central scale - and - platt staircase , added in the early 17th century to replace a turnpike stair in the south - west . The rooms of the upper floors have impressive panelling and decorated ceilings . The main hall , in the south part of the block , has been divided , but retains a large fireplace with the carved initials WS and JE , for William Sinclair and his wife Jean Edmonstone , and the date 1597 . Cultural references . Roslin Castle is one of the places featuring in Sir Walter Scott ' s poem " Rosabelle " . A ballad named " Roslin Castle " was written in the 18th century by Richard Hewitt of Cumberland . The castle was also a featured filming location during Ron Howard ' s movie rendition of Dan Brown ' s book , " The Da Vinci Code " .