Hamilton enlisted in the British Army on 28 February 1755 and was stationed at Portsmouth. He first saw action in June 1756 at the Siege of Fort St Philip, part of the Seven Years' War. Assigned to the 34th Regiment of Foot, he was one of the 2,800 British soldiers fighting under the command of William Blakeney against 15,000 Frenchmen under the Duke de Richelieu and Roland-Michel Barrin de La Galissonière. The French sailed to Fort St. Philip and forced the British to surrender. During the siege, Admiral John Byng sailed there with a relief group, hoping to save the island for the British, but was unsuccessful. The French killed or wounded 400 British in the French victory.