He studied Theology at St. Andrews University, and was highly influenced by the thoughts of Rev Archibald Campbell. After being licensed to preach by the Church of Scotland through the presbytery of Auchterarder in September 1759, he became assistant to Rev James Jobson, the parish minister of Errol in Perthshire. Owing to differences with the minister, he left in 1763 and was then appointed assistant to Antony Dow of Fettercairn in Kincardineshire. During his period here he made several publications, and gained the reputation as a trouble-maker, distancing himself from the established church.
In 1772, lacking a patron as then required by the church, he was rejected as successor to Dow, and was also refused by the presbytery the testimonials required in order to obtain another living. The refusal of the presbytery was sustained by the General Assembly. Dow was instead succeeded by Rev Robert Foote.
Barclay then left the established Scottish church and founded his own church in Edinburgh but also with branches London and Sauchieburn near Stirling. His followers were called Barclayans, Barclayites or Bereans, the latter because they regulated their conduct by study of the Scriptures after the biblical Bereans of Acts xvii. 11. They held to a modified form of Calvinism. The Berean Church had congregations in Scotland, London and Bristol, but mainly merged with the Congregationalists after Barclay's death.
His works, which included many hymns and paraphrases of the psalms, and a book called Without Faith, without God, were edited by J. Thomson and D. Macmillan, with a memoir (1852).
He continued to live on Calton Hill until his death. He died suddenly of apoplexy whilst kneeling in prayer at a friend's house in Edinburgh on 29 July 1798 and is buried in Old Calton Burial Ground.