Bayne was the son of John Bayne of Logie, Fife, to whom he was served heir in general on 8 October 1700, and descended from the old family of 'Bayne of Tulloch', Dingwall, Rosshire. He was admitted advocate on 10 July 1714, but seems to have had little or no practice.
In January 1722 Bayne was appointed curator of the Advocates' Library, and on the establishment of the chair of Scots law in the university of Edinburgh in the same year the town council elected him to fill it. Early in 1726 he retired from the office of curator of the Advocates' Library. In June 1737 he died.
In 1726 Bayne published an edition of Sir Thomas Hope's Minor Practicks. He appended a Discourse on the Rise and Progress of the Law of Scotland and the Method of Studying it. In 1730 he published Institutions of the Criminal Law of Scotland (Edinburgh), for the use of students attending his lectures, and in 1731 Notes for the Use of Students of the Municipal Law in the University of Edinburgh, being a Supplement to the Institutes of Sir George Mackenzie.
Bayne married Mary, daughter of Anne, the only surviving child of Sir William Bruce of Kinross, by her second husband, Sir John Carstairs of Kilconquhar, by whom he had three sons and two daughters. One of his daughters became the first wife of Allan Ramsay the painter and son of the poet.
- "Alexander Bayne – Person – National Portrait Gallery". Retrieved 1 September 2020.
- Stephen, Leslie, ed. (1885). . Dictionary of National Biography. Vol. 3. London: Smith, Elder & Co.