In a 1772 by-election, Graham stood as a Whig a candidate for Perth, in opposition to James Murray of Strowan, brother of the Duke of Atholl, but was defeated by a majority of only six votes out of 100. He remained active in the political field but withdrew shortly before the general election of 1774, having become engaged to the Honorable Mary Cathcart, second daughter of the 9th Lord Cathcart, whose sister was betrothed to the 3rd Duke of Atholl's son and heir. Two years later in 1774 he married Mary and on the same day her elder sister became Duchess of Atholl. "Jane," wrote Lord Cathcart, "has married, to please herself, John, Duke of Atholl, a peer of the realm; Mary has married Thomas Graham of Balgowan, the man of her heart, and a peer among princes." A solicitous husband, when his wife discovered on the morning of an Edinburgh ball that she had left her jewel-box at Balgowan, Graham rode the to and from Balgowan using relays of horses to ensure that she would have her jewellery at the ball.