hood from Charles II, to whom he was introduced in London by the Earl of Lauderdale. In 1669 he was married to Elizabeth, daughter and heiress of Sir James Dundas of Newliston, West Lothian. Having studied for the Scotch bar, he was admitted advocate on 18 Feb. 1672, and at an early period of his career gave indications of that fluent eloquence which afterwards rendered him without a rival in the Scottish parliament. In 1681 he greatly distinguished himself in the defence, as junior to Sir George Lockhart, of the Earl of Argyll, at his trial for treason on account of the explanation he made in taking the test oath (see speech in Howell, State Trials, viii. 931, reprinted in Stair Annals, i. 371–7); but his appearance as the earl's counsel did not prove a prudent step in view of his father's, the lord president's, relation to the Test Act. For some years after the retirement of his father to Holland in 1682 he was subject to considerable persecution. At the close of the year he came into conflict with Graham of Claverhouse, then a captain of dragoons and armed with a sheriff's commission, regarding the jurisdiction of Glenluce, of which he was baillie. On the complaint of Claverhouse that he had acted in ‘violent obstruction and contempt of his authority,’ and had exacted merely nominal fines from his own and his father's tenants, who had been convicted of having attended conventicles, he was committed by the privy council to the castle of Edinburgh, and only obtained his liberty in February 1683, after being deprived of his jurisdiction in Glenluce, paying a fine of 500l., and making a humble apology. In September of the following year he was arrested during the night at his house at Newliston, and his papers seized and examined. No evidence was discovered against him; but, as he declined to give any information regarding the late chancellor, Lord Aberdeen, then under suspicion, he was conveyed under a guard of common soldiers to the Tolbooth prison, where he was kept in durance for three months. On giving security to the amount of 5,000l. he was liberated on 11 Dec., within the bounds of Edinburgh (Fountainhall, Historical Notices, p. 579). At the time of the death of Charles II in February 1685 he was still a state prisoner, and, although his liberty was extended on 7 March to ten miles round Edinburgh (ib. p. 623), did not obtain his full liberty till 29 Jan. 1686 (ib. p. 700). Some months afterwards a prosecution was instituted against his father, Sir James Dalrymple, for complicity in Argyll's invasion of Scotland, and in all probability his estates would have been confiscated had not the son come to the rescue of the government when Sir George Mackenzie, lord advocate, refused to countenance the dispensing power claimed by the king. By a sudden change of front Dalrymple agreed to carry out the behests against which Sir George Mackenzie had revolted. In December 1685 he paid a visit to London, and in February returned to Edinburgh king's advocate, bringing with him at the same time a comprehensive remission of all charges against his father's family, and an order from the king for 1,200l., of which 500l. was the discharge of his fine in 1682, and the remainder for the expenses of his journey and the loss of practice. ‘These preferments,’ according to the author of ‘Memoirs of Great Britain,’ ‘were bestowed upon him by the advice of Sunderland, who suggested that by this means an union between the presbyterian and popish parties might be effectuated’ (Dalrymple, Memoirs, ii. 72). But if Dalrymple's readiness to carry into effect the dispensing power commended him to the favour of James, his toleration of ‘field conventicles,’ which were strictly prohibited by law, rendered it advisable to deprive him of the office of public prosecutor, and, accordingly, on the death of Sir James Foulis, he succeeded him as lord justice-clerk, 19 Jan. 1688, the office of king's advocate being restored to Sir George Mackenzie. In the same year he purchased the estate of Castle Kennedy, the beautiful residence of which is now the seat of the family of Stair.
According to the author of the ‘Memoirs of Great Britain,’ ‘Sir John Dalrymple came into the king's service resolved to take vengeance if ever it should offer: impenetrable in his designs, but open, prompt, and daring in execution, he acted in perfect confidence with Sunderland’ (ii. 72); and Lockhart asserts that he ‘advised King James to emit a proclamation remitting the penal laws by virtue of his own absolute power and authority, and made him take several other steps with a design (as he since bragged) to procure the nation's hatred and prove his ruin’ (Lockhart Papers, i. 88). This statement can scarcely be harmonised with the fact that Dalrymple was himself the agent in carrying out the king's dispensing power; but there can at least be no doubt that from the first he was in the secret of the enterprise of the Prince of Orange. His father came over in the prince's own ship, and on the news of the prince's landing Viscount Tarbet and Dalrymple were the first to take measures to promote his cause (Balcarres, Memoirs). Dalrymple was specially active in securing the election of representatives to the convention of estates who would favour