Ultimately he gave up theology, studied the fine arts, and tried unsuccessfully to make a living in Edinburgh as a miniature-painter and man of letters.
Destined for the ministry of the Secession Church by his family, in 1790 he entered the University of Edinburgh. He was acquainted with John Leyden and Alexander Murray. Settling in Dunfermline, Mercer lived by teaching and by drawing patterns for the damask manufacturers.
In later life he suffered money troubles.
He died at Dunfermline, 11 June 1842.