He was first trained by his uncle, Lord Dumbarton, in military service of the 1st Regiment of Foot (then known as His Majesty's Royal Regiment of Foot, and currently known as The Royal Scots). In 1689, after entering military service, he became a lieutenant colonel, and a few months later was brevetted colonel. He and his regiment served at the battles of the Boyne and Aughrim in the Irish War. He then moved to command of the Royal Fusiliers and fought at the Battle of Steinkirk. He proceeded to move back to the 1st Foot and he eventually fought at the battles of Landen and Namur, both of which were fought during the Battle of the Grand Alliance. He also participated in various battles of Irish War. At Namur, however, Hamilton received a serious wound, and was eventually promoted to brigadier general.
In 1695, Hamilton married Elizabeth Villiers, and the following year, he was made Earl of Orkney, which was part of the Scottish peerage. He became a major general and fought in the War of the Spanish Succession with John Churchill, 1st Duke of Marlborough. A few years later, he was promoted to lieutenant general. At the Battle of Blenheim, Hamilton's column was the first to take the city, and in June 1705, he marched his column from Moselle to relieve the besieged city of Liege. At the Battle of Ramillies, he led the pursuit of the defeated French, and he played a major role at the Battle of Oudenarde.
In 1708, he captured two major fortifications at Tournay. At the desperate Battle of Malplaquet, Lord Orkney's battalions led the charge toward the French entrenchments, suffering serious losses. He remained with his army near Flanders, until the end of the war; during that time, he received a promotion to full general. After the peace treatise, he received the honorary title of Colonel Commandant of his old unit, the 1st Foot. For the next few decades, he held civilian and military positions of importance, until he received the rank of field marshal in 1736. This is the first rank of field marshal (as understood now) ever given in the British Military. A year later, though, Hamilton died in London.