Born in Edinburgh, Mackie was educated at Middlesbrough High School and Jesus College, Oxford, where he took a first-class degree in history and won the Lothian Essay Prize. He was appointed as a lecturer in history at the University of St Andrews in 1909, aged 22. While at the university he introduced the subject of Scottish history into the curriculum.
During the First World War, he served in the Argyll and Sutherland Highlanders and was awarded a Military Cross. He was wounded in both the stomach and in the shoulder. In both cases he received innovative treatment. For the stomach wound (caused by a machine-gun) he was treated at a military hospital in Rouen. Sterilised water was dripped right through his stomach and he recovered well. The shoulder wound was received in the last days of the war. He nearly had to have his arm amputated but he opted for a new treatment in which the nerve was knotted. However, he never regained full use of his left hand and suffered considerable pain for the remainder of his life. He returned to St Andrews after the war, before being appointed professor of modern history at Bedford College, University of London, in 1926.
He was Professor of Scottish History and Literature at the University of Glasgow from 1930 to 1957. It was during these years that he wrote The Earlier Tudors 1485-1558 (Oxford University Press). An influential volume, The Earlier Tudors was a new analysis of Tudor administration – the business of government. In 1957 he retired, and was appointed Historiographer Royal for Scotland.
Mackie returned to the University of Glasgow lecture hall in 1961 in the capacity of emeritus professor.
He died in Haslemere in 1978 and was buried at Grayswood church. His medals are in the regimental museum of the Argyll and Sutherland Highlanders at Stirling Castle. The Letters Patent appointing him Historiographer Royal were sent to the Hunterian Museum at the University of Glasgow
- Pope Adrian IV, Oxford, 1907 (Blackwells)
- Negotiations Between James VI and I and Ferdinand I of Tuscany, 1927
- Cavalier and Puritan, 1930
- Andrew Lang and the House of Stuart, 1935
- The Complete Scotland: A Comprehensive Survey, Based on the Principal Motor, Walking, Railway and Steamer Routes, 1949
- The Earlier Tudors, 1485–1558, 1952
- The University of Glasgow, 1451–1951: A Short History, 1954
- A History of the Scottish Reformation, 1960
- A History of Scotland, 1964
- A History of Scotland, revised ed., Penguin, 1977 ISBN 0-14-020671-X
- "John Duncan Mackie (The University of Glasgow Story)". Retrieved 27 March 2019.
- Works by or about J. D. Mackie at Internet Archive