Born at Edinburgh in 1729 (the Memoir says 1733), he was eldest son of a prosperous druggist. He was sent to the grammar school at ten, and at fifteen to the university, where he remained until he was twenty-one, having devoted the last three years to medicine. He spent the next year or two studying in London, in Rouen (under Le Cat), and in Paris (under Petit), and on his return to Edinburgh graduated M.D. in 1753 (thesis, ‘De Cantharidibus’). After practising for a few months at Gainsborough, and a few years at Beverley, he was invited to York in 1763, on the death of Dr. Perrot, and continued to practise there until his death in 1809.
In 1772 Hunter set to work to establish the York Lunatic Asylum. The building was finished in 1777, and Hunter was physician to it for many years. He was elected Fellow of the Royal Society (London) in 1777, and F.R.S. (Edinburgh) in 1790. He was also made an honorary member of the Board of Agriculture.
He died on 17 May 1809, and was buried in St Michael le Belfrey, York.
His first literary venture was a small tract in 1764, an ‘Essay on the Nature and Virtues of the Buxton Waters,’ which went through six editions. The last appeared in 1797 under the name of ‘The Buxton Manual.’ In 1806 he published a similar work on the ‘Waters of Harrowgate,’ York. He took an active part in founding the Agricultural Society at York in 1770, ‘and to give respectability to the institution, he prevailed on the members to reduce their thoughts and observations into writing.’ These essays, on the food of plants, composts, &c., were edited by him in four volumes (London, 1770–2), under the title of ‘Georgical Essays,’ and were so much valued as to be reprinted three times (once at London and twice at York) before 1803. His ‘New Method of Raising Wheat for a Series of Years on the Same Land’ appeared in 1796, York.
His continued interest in rural economy was shown in an elaborate illustrated edition, with notes, of John Evelyn's Sylva, 1776 (reprinted in 1786, in 2 vols. in 1801, and again, after his death, in 1812). In 1778 he edited Evelyn's Terra, and joined it to the third edition of the Sylva, 1801. In 1795 he addressed a pamphlet to Sir John Sinclair on ‘Outlines of Agriculture’ (2nd edit. 1797). In 1797 he published ‘An Illustration of the Analogy between Vegetable and Animal Parturition,’ London.
He was author of a tract on the curability of consumption, extracted from a manuscript of William White of York, of which a French translation by A. A. Tardy (London, 1793) appeared; and also of a cookery-book, called ‘Culina Famulatrix Medicinæ,’ first published in 1804, reprinted in 1805, 1806, and 1807, and finally in 1820 under the title ‘Receipts in Modern Cookery.’ A production of his old age, which became well known, was a collection of maxims called ‘Men and Manners; or Concentrated Wisdom.’ It reached a third edition in 1808; the last edition contains 1,146 maxims.
He was twice married, first, in 1765, to Elizabeth Dealtry of Gainsborough, by whom he had two sons and one daughter, who predeceased him, and secondly, in 1799, to Anne Bell of Welton, near Hull, who survived him.