 On 4 April 1691 he married Janet, daughter of Sir James Rocheid of Inverleith, the widow of Alexander Murray of Melgund.Dalrymple was elected to represent Culross in 1698 in the Parliament of Scotland, as a member of the Stair–Queensberry alliance.He was created baronet on 8 May 1701 and was also appointed joint solicitor-general for Scotland and auditor of treasury of Scotland in 1701.