Dunbar was a Scottish writer and Professor of Moral Philosophy.
He was educated at King's College, of which he was elected a regent in 1766. He taught moral philosophy as a Professor there for the next 30 years. In 1783 he became a founding member of the Royal Society of Edinburgh.
James Dunbar published two works: De Primordiis Civitatum Oratio in qua agitur de Bello Civili inter Magnam Britanniam et Colonias nunc flagrante (1779), and Essays on the History of Mankind in rude and uncultivated ages (1780).