John Hamilton was a great3-grandson of James and Janet (Hamilton) Muirhead.(
John Hamilton, 3rd Lord Belhaven, son of John and Margaret Hamilton, married Anne Bruce, a daughter of Andrew Bruce of Edinburgh. They gave birth to: John, James, Margaret, Andrew, and Robert. The eldest son, John, inherited the title of 4th Lord Belhaven, but he died unmarried. The second son, James, then inherited the title of 5th Lord Belhaven. He also died unmarried and without issue. The youngest sons, Andrew and Robert, died unmarried and without issue in 1736 and 1743 respectively. John, 3rd Lord Belhaven, died on 17 November 1721.
Margaret Hamilton, daughter of John and Anne Hamilton, married Alexander Baird, son of Sir William 1st Bart of Newbyth.