He was educated at Aberdeen and St Andrews Universities. In 1655 he was appointed Minister to Parish of Barony in Glasgow from which he was dismissed or ejected in 1662. He returned later and tried to hold a communion but the service was interupted and he was arrested briefly. He was wounded at the Battle of Bothwell Bridge on June 22, 1679 between Royalists and Covenanters, and fled to the Netherlands. Returning to Scotland in 1680 he issued the Sanquhar Declaration with Richard Cameron calling for war against King Charles II and the exclusion of his brother, afterwards James II from the succession. Eventually he was arrested and sentenced to death, and beheaded in Edinburgh.