Dalrymple's father, James Dalrymple, had been a prominent lawyer; having served as Lord President of the Court of Session, he was created a baronet, of Stair in the County of Ayr, in the Baronetage of Nova Scotia in 1664, and in 1690 he was raised to the Peerage of Scotland as Lord Glenluce and Stranraer and Viscount of Stair.
The son, John Dalrymple, actively supported William III's claim to the throne and served as Secretary of State for Scotland. However, he was forced to resign after he authorised the massacre of Glencoe of 1692. He was made Lord Newliston, Glenluce and Stranraer and Viscount of Dalrymple, at the same time as he was given the earldom, also in the Peerage of Scotland. All three titles were created with remainder, in default of male issue of his own, to the heirs male of his father.
The first Earl of Stair was succeeded by his eldest son, the second Earl. He was a prominent soldier and served as Commander-in-Chief of the Forces. In 1707 Lord Stair surrendered all his honours to the Crown, and obtained a new charter empowering him to name as his successor any male descendant of the first Viscount of Stair. In 1747, shortly before his death, he nominated his nephew John Dalrymple (d. 1789), second son of his third brother George Dalrymple (d. 1745). This was mostly because his second brother Colonel the Hon. William Dalrymple (d. 1744) (heir presumptive to the peerages from 1707 to 1744) had married Penelope Crichton, 4th Countess of Dumfries, a peeress in her own right. This nomination was contested and the House of Lords decided in favour of James Dalrymple (d. 1760), the second son of the aforementioned Colonel the Hon. William Dalrymple by his wife the Countess of Dumfries. The House of Lords decided in 1748 in this case that the power of nomination could not be validly exercised after the Union. On his uncle's death in 1747 James succeeded as third Earl of Stair.
He was childless and was succeeded by his elder brother, the fourth Earl, who had already succeeded his mother as fifth Earl of Dumfries. He was also childless and on his death in 1768 the two earldoms separated. He was succeeded in the earldom of Dumfries by his nephew Patrick Macdouall-Crichton (see the Earl of Dumfries for later history of this title). The earldom of Stair and its subsidiary titles were passed on to his cousin, the aforementioned John Dalrymple, the fifth Earl, who in 1747 had been nominated for the earldom by his uncle the second Earl. He was succeeded by his son, the sixth Earl. He sat in the House of Lords as a Scottish Representative Peer from 1793 to 1807 and from 1820 to 1821 and also served as Ambassador to Prussia.
He died childless and was succeeded by his cousin, the seventh Earl. He was the son of General William Dalrymple. He also died without issue and was succeeded by his distant relative Sir John Hamilton Dalrymple, 5th Baronet, of Killock, who became the eighth Earl of Stair (see below for earlier history of the baronetcy). Lord Stair was a General in the Army and also sat as Member of Parliament for Edinburgh. In 1841 he was created Baron Oxenfoord, of Cousland in the County of Edinburgh, in the Peerage of the United Kingdom, with remainder to his brother. This peerage gave the Earls an automatic seat in the House of Lords. The Oxenfoord title was in honour of his property Oxenfoord Castle, and the title held by his wife's family, the Viscounts of Oxfuird (or Oxenfoord). He was succeeded by his younger brother (in the barony of Oxenfoord according to the special remainder), the ninth Earl.
His son, the tenth Earl, represented Wigtownshire in the House of Commons as a Conservative and served as Lord Lieutenant of Ayrshire and Wigtownshire. His grandson, the twelfth Earl, also sat as Conservative Member of Parliament for Wigtownshire and served as Lord Lieutenant of Wigtownshire. On his death the titles passed to his son, the thirteenth Earl. He was also Lord Lieutenant of Wigtownshire. As of 2007 the titles are held by his eldest son, the fourteenth Earl, who succeeded in 1996. In May 2008 the fourteenth Earl was elected to sit as a Hereditary Cross-Bench Peer in the House of Lords following the death of Baroness Darcy de Knayth
The Dalrymple Baronetcy, of Killock, was created in the Baronetage of Nova Scotia in 1698 for James Dalrymple, second son of the first Viscount of Stair. His great-grandson, the fourth Baronet, was a Baron of the Court of Exchequer in Scotland. He married his cousin Elizabeth Macgill, the heir and representative of the Viscounts of Oxfuird (or Oxenfoord). Their son, the aforementioned fifth Baronet, succeeded his kinsman as Earl of Stair in 1840. See above for further history of the baronetcy.
Another member of the Dalrymple family was Hew Dalrymple, third son of the first Viscount of Stair. He served as Lord President of the Session under the judicial title Lord North Berwick. In 1697 he was created a baronet, of North Berwick in the County of Haddington, in the Baronetage of Nova Scotia. His second son Hew Dalrymple was the great-grandfather of Robert Dalrymple-Horn-Elphinstone, who was created a baronet, of Horn, and Logie Elphinstone in the County of Aberdeen, in 1828. See Dalrymple baronets for more information on these branches of the family.
The title of the earldom comes from the hamlet of Stair, the ancestral home of the Dalrymple family who settled there in the 12th century. To facilitate the original title, in 1653 James Dalrymple, 1st Viscount Stair, had a portion of Ochiltree severed so as to create the Parish of Stair.
The heir apparent is the present holder's son, John James Thomas Dalrymple, Viscount Dalrymple (born 2008).