In June 1676, when the staff of clerks was reduced to three, he lost his place and, attributing this result to the machinations of the Duke of Lauderdale, he joined the malcontent Presbyterian party.
[2] In the spring of 1683 he and several sympathisers went to London, ostensibly to arrange for a Scots colony in the Carolinas, but really to help the Earl of Shaftesbury in a great Whig plot to overthrow the King and Government and to exclude the Catholic Duke of York from succession to the throne.
An inner circle of conspirators, including nine of the Scotsmen except Robert Ferguson, had a scheme to waylay and murder the King and the Duke of York at the Rye House while on their way from Newmarket to London.
After a Preliminary examination by the Privy Council he and a dozen other Scotsmen were sent to Edinburgh for trial and ware imprisoned in the Tolbooth in solitary confinement for ten months.
His weakness "did so discompose and confound him, to discover others, that he desperately offered money to the keeper of the Tolbuith's man to run him throw (sic) with his sword."