He became Viscount Dalrymple in 1703 when his father was created 1st Earl of Stair.[4] In January 1706 he was appointed colonel of the Earl of Angus's Regiment.[4] He commanded a brigade at the Battle of Ramillies in May 1706 and, having been promoted to brigadier general on 1 June 1706,[1] became colonel of the Grey Dragoons on 24 August 1706.[4] He became 2nd Earl of Stair in January 1707 when his father died and later that year he was elected as one of sixteen Scottish representative peers in the newly formed Parliament of Great Britain.[1]
He was sent to Flanders to join the military campaign there in April 1712[5] and became colonel of the Black Dragoons on 9 April 1714.[6]
Diplomatic service
When King George I ascended to the throne in August 1714, Dalrymple was sent as an envoy to the Court of France at Versailles.[1] He was temporarily recalled on 20 November 1714 to take up the appointment of Commander-in-Chief of the Forces in Scotland.[7]
According to the Duc de Saint-Simon, Stair quickly established friendly relations with Philippe II, Duke of Orléans, Regent to the young King Louis XV, paving the way for the Triple Alliance.[8] During his time in Paris, Stair's spies effectively thwarted various "intrigues" by the Jacobites.[9] However, his intemperate hostility to the Scottish financier John Law, whom the Regent had appointed controller of Louis XV's finances, cost him the confidence of British government ministers.[10]
From 1715 to 1720 Stair was based as ambassador at Versailles, where he was greatly inspired by the landscaping.[11]
Stair retired from his position as ambassador in France in June 1720.[12] On his return to Scotland, Stair planted extensively on the Versailles model at his estates at both Newliston House and Castle Kennedy.[13]
In 1729, he became Vice Admiral of Scotland, but lost the position on 5 May 1733,[14] mainly because of his opposition to the Excise Bill of 1733 promoted by Prime MinisterRobert Walpole.[1] He was promoted to full general, on the basis of seniority, on 27 October 1735[15] and also found time to lay out the gardens at Castle Kennedy in the 1730s.[16]
In March 1708 he married Lady Eleanor Primrose Campbell, daughter of James Campbell, 2nd Earl of Loudoun. She already had four children and they had no children.[4]
Sir Walter Scott's story My Aunt Margaret's Mirror is believed to have been based on efforts made by the Earl of Stair to get Lady Eleanor Primrose Campbell to marry him.[1][4][29] Stair wanted his earldom to pass to his nephew John Dalrymple; but on 4 May 1748 the House of Lords ruled that the right to nominate an heir had lapsed, and the earldom passed to the legal heir James Dalrymple, 3rd Earl of Stair.[3]