O'Brien, William (c.1640–92), 2nd earl of Inchiquin , army officer and colonial governor, was the eldest son of Murrough O'Brien (qv) (c.1614–1673), 6th Baron Inchiquin and 1st earl of Inchiquin, and his wife, Elizabeth St Leger (d. 1685), daughter of Sir William St Leger (qv), lord president of Munster. Following the outbreak of the 1641 rising he was sent to England for safety, where he was educated by Sir Philip Percival, an ally and friend of the Inchiquin family. Upon his father's defection to the royalists in 1648, he was imprisoned in the Tower of London, but was released when parliament negotiated his exchange for parliamentary prisoners held by Inchiquin in Munster. Lord O'Brien (as he was styled during his father's lifetime) arrived at Castlehaven, Co. Cork, under the escort of Colonel Beecher, to be exchanged in November 1648.
During the 1650s O'Brien served in Catalonia with his father, who was appointed governor of the regions controlled by France in 1654. He remained a staunch protestant despite the conversion of his father and younger brothers to catholicism; English pressure after Inchiquin's conversion led to O'Brien's being awarded the command of his father's regiment in French service. In 1658, without government permission, he returned to Munster, where he spent three weeks consulting with his father's associates. He was closely watched by Henry Cromwell (qv) and was warned not to enter Ireland again without a pass. In February 1660 he joined his father in a French expedition to Lisbon to aid the Portuguese against the Spanish. Within sight of the port their ship was attacked by an Algerian corsair and they were captured and taken to Algiers as prisoners; O'Brien lost an eye during the attack. Pressure from the English council of state led to the quick release of the earl, but his son and servants remained in Algiers as hostages until June 1661, when they were set free on the payment of a substantial ransom.
In 1671 O'Brien became a member of the Irish privy council and in 1674 was appointed governor of Tangier and captain general of the king's forces there, a position he held for eight years. He was also gazetted as a colonel of the Tangier regiment of infantry. Upon the death of his father in September 1674 he became the 2nd earl of Inchiquin, inheriting an estate of 60,000 acres in Munster.
In 1688 O'Brien became a supporter of William of Orange (qv), and in 1689 he raised soldiers in Munster to oppose James II (qv). The Munster protestants he recruited, however, received little support from England and were easily dispersed by Justin MacCarthy (qv), Lord Mountcashel. Inchiquin was forced to flee to England with his son, William, and his estates were sequestered under the act of attainder passed by the Irish parliament in 1689. In London O'Brien offered his services to William III and his loyalty was rewarded on 19 September 1689, when he was appointed governor of Jamaica. He arrived there on 31 May 1690 and was soon involved in organising the colony's defences against French attack and in suppressing a slave uprising. In 1691 he quarrelled with the Jamaican assembly over matters concerning his authority and the revenue. He died of fever 16 January 1692, perhaps partly as a result of the stress caused by his conflict with the assembly, and was buried at Santiago de la Vega, Jamaica.
In December 1665 O'Brien married, as his first wife, Margaret Boyle (d. 1683), third daughter of Roger Boyle (qv), earl of Orrery. The marriage helped to reconcile the Boyle and O'Brien families after years of disputes in Munster. The couple had three sons, William (1666–1719), who succeeded his father, Henry, who died in infancy, and James, who died unmarried in 1693; they also had a daughter, Margaret. O'Brien married secondly Elizabeth (1651–1758), youngest daughter of George Bryges, 6th Baron Chandos; their marriage was childless.