Bavelaw Castle is a historic house in the City of Edinburgh council area, Scotland. It is north of Hare Hill in the Pentland Hills, four miles west of Penicuik, and two miles south of Balerno, above Threipmuir Reservoir. The house was built around a 16th-century L-plan tower house. Mary, Queen of Scots, and James VI both stayed at Bavelaw.