 James' paternal grandparents were Robert Lundin (1675–1716) and Anne Inglis (a daughter of Sir James Inglis of Cramond).His grandfather Robert was a younger son of John Drummond, 1st Earl of Melfort (younger son of the 3rd Earl of Perth) by his first wife, Sophia Maitland.Sophia, his great-grandmother, had inherited Lundin from her brother John Lundin of Lundin, both children of Margaret (née Lundin) Maitland and Robert Maitland (a younger son of John Maitland, 1st Earl of Lauderdale).