Hamilton was returned as MP for Lanarkshire at a by-election on 23 December 1718. He retained his seat at the 1722 British general election , with the help of his 19-year-old nephew, the 5th Duke of Hamilton, a Tory who was actually on the opposing side politically. He was returned again unopposed for Lanarkshire at the 1727 British general election and joined the Board of Admiralty under the Walpole–Townshend ministry in May 1729. He was advanced to First Naval Lord in June 1733 He did not stand at the 1734 British general election, but was returned as MP for Queenborough at a by-election on 22 February 1735. After he failed to support a bill for the Prince of Wales's allowance, he was forced to stand down as First Naval Lord in March 1738. However he was appointed cofferer and surveyor general to the Prince of Wales in 1738. He did not stand at the 1741 British general election, but was returned as MP for Dartmouth at a by election on 27 March 1742. He rejoined to Board, as Senior Naval Lord again, in March 1742 under the Carteret ministry and remained on the Board until the Broad Bottom ministry fell in February 1746. He served as Governor of Greenwich Hospital from 1746 until his death. He kept his post under the Prince of Wales until 1747, when he was turned out for refusing to follow him into opposition. He gratefully accepted a pension of £1,200 a year offered by the Prince.