Hamilton, Gustavus (1642–1723), 1st Viscount Boyne, soldier , was third son of Sir Frederick Hamilton (qv) (c.1590–1647) of Manorhamilton, Co. Leitrim, who had served in the Swedish army and the wars in Ireland, and his wife, Sidney, daughter and heir of Sir John Vaughan (qv), governor of Londonderry. His career has been frequently confused with that of his contemporary namesake, Gustavus Hamilton (qv) of Monea (d. 1690), who was governor of Enniskillen in 1689. He matriculated at TCD in 1661, but chose a military career, and saw active service from 1672 to 1676 as a captain in the Irish regiment of Sir George Hamilton (qv), a largely catholic formation which formed part of a British brigade in the service of France against the Dutch. After his return, Oxford University conferred him with a doctorate of civil law in 1677, during a visit by the chancellor, the duke of Ormond (qv), whom he attended. From 1678 he was listed as a captain in the Irish army, and when this force was regimented in 1684 he became major of the regiment of foot of Lord Mountjoy (qv).
He survived the purge of protestants from the Irish army by the earl of Tyrconnell (qv), but changed allegiance after the Glorious Revolution and was attainted by the Jacobite parliament in 1689. On 27 March of that year he beat off the initial attack of the Jacobite army on Coleraine, of which he was governor. However, when the enemy used boats to cross the Bann and threaten his rear twelve days later, he withdrew his small garrison to Derry. He then went to England, where on 1 June he was given command of a new regiment, afterwards the 20th Foot, whose first colonel, Sir Robert Peyton, had died, and whose formation he successfully completed. He commanded his regiment in the war in Ireland in 1690–91, taking part in the major engagements at the Boyne, Limerick, and Aughrim, and especially distinguishing himself at the siege of Athlone, where on 30 June 1691 he courageously led the grenadiers across the river in the hazardous assault that gained the town for the Williamites. Promoted brigadier-general in 1696, he served in 1702 with the discreditable expedition to Cadiz and the redeeming attack on the Spanish treasure fleet at Vigo, for which Queen Anne presented him with a considerable quantity of plate. In 1704 he was made a major-general.
For his good service in the war in Ireland he was appointed to the sinecures of vice-admiral of Ulster and governor of Athlone, was granted 3,500 acres of confiscated land in Co. Meath, and amassed other property by purchase, on which (c.1716) he built Stackallan House. Generally classed as a whig, he was MP for Co. Donegal in the parliaments of 1692–3, 1695–9, and 1703–13, and for Strabane in 1713–14, and a member of the Irish privy council under William III (qv), Anne, and George I. In 1715 he was created Baron Hamilton of Stackallan and in 1717 Viscount Boyne. He was one of the proposed managers of the aborted national bank in 1721.
He married first Elizabeth, second daughter of Sir Henry Brooke (qv) of Brookeborough, Co. Fermanagh; and after her death, Anne, daughter of Sir George St George, bart. Three sons and a daughter were born of the second marriage. He died 16 September 1723 at Stackallan in his eighty-second year, and was buried there. His portrait in oils by an unknown artist, stated to be from a private collection, depicting him in armour and with a battle scene in the background possibly representing the siege of Athlone, is reproduced in Kings in conflict: Ireland in the 1690s (Ulster Museum catalogue, 1990), p. 221. As he had been predeceased by his eldest son, Frederick, his grandson, Gustavus (1710–46), succeeded to his title and estate.