The lands of Oxenfoord were owned by the Riddel family in the 12th century. By the 16th century the MacGills owned the estate, and built the original tower house.[2] In 1651, James MacGill was elevated to the peerage as Viscount of Oxfuird. Oxenfoord passed through the family until it was inherited by Thomas Hamilton of Fala. His daughter and heiress, Elizabeth Hamilton, married Sir John Dalrymple, 4th Baronet, in 1760, and they inherited the estate in 1779. Sir John, a lawyer, scientist, and historian, published Memoirs of Great Britain and Ireland (1771), and Essays on Different Natural Situations of Gardens (1774), an influential book at the time.[2] A friend of Robert Adam, he commissioned the architect to rebuild his tower house at Oxenfoord in 1780. The L-plan tower was absorbed into the new building, in a similar manner to Adam's Culzean Castle. A new approach bridge was built around this time by Alexander Stevens, an Adam associate.[1] The bridge is also a category A listed building.[3]
Sir John's son, in 1840, inherited the title 8th Earl of Stair. He commissioned William Burn to remodel the castle in 1842.[1] A new wing and entrance was added in the style of Adam's work. The 8th and 9th Earls established a pinetum on the grounds of the house. In 1864 the 10th Earl inherited Lochinch Castle in Galloway, and made his principal home there rather than at Oxenfoord.[2] From 1931 until 1993 the house was used by Oxenfoord Castle School, founded by Lady Marjorie Dalrymple,[1] sister of John Dalrymple, 11th Earl of Stair.[4] Since 1993, the house has reverted to private use by the Dalrymple family[1] and has been used as a wedding venue, for private parties, and for corporate events.[4]