Elrig (Scottish Gaelic: An Eileirg, meaning the deer run) is a Clachan in Dumfries and Galloway Council, Scotland. Located in the Machars peninsula, it is about 3 miles (4.8 km) north of Port William.
Elrig is the birthplace of author and naturalist Gavin Maxwell, who was born at the House of Elrig. His boyhood is recounted in The House of Elrig, published in 1965. The grounds of his family estate are open to the public, but the house is private with no public access.
A standing stone, the Carlin Stone, can be found on The Derry, near to the head of Elrig Loch, which is also home to the remains of a crannog. The ruins of a mediaeval chapel can be found at Barhobble, which is near to the House of Elrig. None of the above are within Elrig itself, but are located relatively near to the settlement in Mochrum Parish.