Located 1½ miles (2.5 km) south southwest of Loanhead, Roslin was supposedly founded in Pictish times (3rd century AD) but its later importance derived from its chapel which made it the third town of the Lothians after Edinburgh and Haddington. Sir William St. Clair began Rosslyn Chapel, one of Scotland's architectural treasures, in 1446 and gave houses and land in the village to the masons who constructed it, greatly expanding the settlement. The chapel lies just to the southeast of the village, as does the 14th century Rosslyn Castle, which is also associated with the St. Clair family.
Roslin was created a burgh in 1456 while its industries included mining (from the 12th century) and a bleachfield in the 19th century. The Moat Colliery, located to the northwest of the village, employed 750 men at its peak but closed in 1969 and the site has subsequently been landscaped. Today's attractive village dates mostly from the late 19th century. The River North Esk runs through nearby Roslin Glen Country Park, passing Rosslyn Chapel and Wallace's Cave.
Artistic visitors have included Sir Walter Scott (1771 - 1832), the Wordsworths, Dr. Samuel Johnson (1709-84) and James Boswell (1740-95), Robert Burns (1759-96) and the painter Alexander Nasmyth (1758 - 1840).