Located 5 miles (8 km) southeast of Edinburgh. Loanhead is a former mining (coal and shale) and paper-making town which had a market from the late 17th Century. The Clerks of Penicuik built miners' houses in 1736 while in 1884 Loanhead was established as a burgh with several villas built in this period. Burghlee Colliery to the southwest was sunk c.1860 and was 366m (1200 feet) in depth. This employed 795 miners at its peak but closed in 1965, to be redeveloped as the Bilston Glen Super Colliery, which survived until 1989. Ramsay Colliery, lying to the east of the village, was sunk c.1850 and latterly comprised two shafts of 174m (570 feet) and 302m (990 feet) respectively. At its peak it employed 385 men but it also closed in 1965.
Nearby is one of Scotland's finest houses, Mavisbank (1723-7), built by William Adam for the laird and mine owner Sir John Clerk. Now ruined, it was once used as a hospital but was struck by fire in 1973.