John Macadam was born at Northbank, Glasgow, Scotland, on 29 May 1827, the son of William Macadam (1783-1853) and Helen, née Stevenson (1803-1857). His father was a Glasgow businessman, who owned a spinning and textile printing works in Kilmarnock, and was a  burgess and a bailie (magistrate) of Glasgow. His fellow industrialists and he in the craft had developed, using chemistry, the processes for the large-scale industrial printing of fabrics for which these plants in the area became known.
John Macadam was privately educated in Glasgow; he studied chemistry at the Andersonian University (now the University of Strathclyde) and went for advanced study at the University of Edinburgh under Professor William Gregory. In 1846–47, he went on to serve as assistant to Professor George Wilson at the University of Edinburgh in his laboratory in Brown Square. He was elected a fellow of the Royal Scottish Society of Arts that year, and in 1848, a member of the Glasgow Philosophical Society. He then studied medicine at the University of Glasgow (LFPS, MD,1854; FFPSG,1855).
He was a member of what became a small dynasty of Scottish scientists and lecturers in analytical chemistry, which included, other than himself, his eldest half brother William Macadam, his immediate younger brother Stevenson Macadam (a younger brother Charles Thomas Macadam, although not involved as a scientist, was also indirectly involved in chemistry becoming a senior partner in a chemical fertiliser company) and nephews William Ivison Macadam and Stevenson J. C. G. Macadam, as well as the former nephew's daughter, his great niece Elison A. Macadam.
On 8 June 1855, aged 28, Macadam sailed for Melbourne in the Colony of Victoria, Australia, on the sailing ship Admiral. He arrived on 8 September 1855.