Hamilton was married firstly, c.1490, to Elizabeth Home, daughter of Alexander Home, 2nd Lord Home. The marriage was dissolved in 1506, when it was found that her first husband Thomas Hay, a son of John Hay, 1st Lord Hay of Yester, was still alive at the time of the wedding. In November 1516 Hamilton married Janet Bethune of Easter Wemyss, daughter of Sir David Bethune of Creich, and widow of Sir Robert Livingstone of Easter Wemyss, who had been killed in the Battle of Flodden Field. In November 1504 Hamilton had been granted a divorce from Elizabeth Home on the grounds that she had previously been married to Thomas Hay. Hay had apparently left the country and was thought to be dead when Hamilton married Home in or before 1490, but in fact he did not die until 1491 or later. This award of divorce was repeated in 1510, suggesting that Hamilton had continued living with her after 1504, and was held by some to undermine the dissolution of the first marriage as invalid. It is likely that the real motive for divorcing Elizabeth was that she had not born any children and that Hamilton wanted a legitimate heir – he already had several illegitimate children, his eldest illegitimate son being James Hamilton of Finnart. The complicated legal issues of the second marriage would continue to trouble his heir, whose legitimacy was questioned by his rivals in 1543.