O'Reilly, Philip MacHugh (1599–c.1664), politician and soldier, was son of Hugh O'Reilly of Ballynacargy, Co. Cavan, one of the ‘deserving’ native Irish of the Ulster plantation, and Katherine MacMahon. Another Hugh O'Reilly (qv), the prominent catholic archbishop of Armagh, has been mistakenly identified as Philip's uncle in a number of accounts. Contemporary sources refer to him as a lawyer, but no records exist of his having attended inns of court in England. He may well have received legal training on the Continent, prior to accepting a command in the French army. He inherited the family lands in Cavan after his return to Ireland, and played an active role in local politics as commissioner of the peace (1625) and sheriff (1629). Elected as MP for the county in the 1640 parliament, he sat on the committee that drew up charges of treason against the lord chancellor, Sir Richard Bolton (qv) and others. During the course of 1641, he became involved with a plot against the Dublin administration, primarily through his links with Rory O'More (qv) and Owen Roe O'Neill (qv), the leading native Irish exile, whose sister, Roisín (Rose), he had married. Reports of the anti-catholic rhetoric of Scottish covenanters and the Westminster parliament convinced O'Reilly and his colleagues that armed action was necessary. By taking advantage of the king's difficulties in Scotland and England, they hoped to gain concessions for Irish catholics, including the recovery of ancestral estates in Ulster.
In October 1641, together with his nephew Mulmore O'Reilly, sheriff of Cavan, Philip assumed command of the rebel forces in that county, and was expelled from parliament as a result. The Cavan insurgents prepared a remonstrance, outlining their grievances but stressing their loyalty to Charles I. Philip captured Belturbet, Kells, and Navan in quick succession, at all times treating the protestant population honourably, a trademark of his leadership. On 27 November O'Reilly and his men crossed the Boyne into the Pale, and two days later inflicted a crushing defeat at Julianstown on a government force sent from Dublin to relieve Drogheda. The victory proved instrumental in convincing the nobility and gentry of the Pale to join forces with the northern insurgents, and establish the confederate catholic association in Kilkenny. O'Reilly took part in the unsuccessful siege of Drogheda during the winter of 1641–2, before leading his men into the camp of Owen Roe O'Neill after the latter's arrival in Ireland in July 1642. He accepted the position of colonel of a mixed infantry and cavalry regiment in the confederate Ulster army, serving with distinction for over ten years. He fought in all the major northern campaigns, including the famous victory over the Scottish covenanters at Benburb, Co. Tyrone (5 June 1646).
Although primarily a soldier, O'Reilly also sat on the first confederate supreme council in November 1642 and attended a number of general assemblies in Kilkenny. He was named in the 1646 peace treaty as a commissioner of trust to rule in association with the royalist lord lieutenant, James Butler (qv), marquess of Ormond. None the less, he opposed the treaty and the subsequent truce with Murrough O'Brien (qv), Lord Inchiquin, in 1648. In the confederate civil war that resulted, the majority of Ulster leaders who had held land in 1641 abandoned Owen Roe O'Neill, but O'Reilly proved the exception. After O'Neill's death, O'Reilly unsuccessfully contested the election to replace him, but nonetheless agreed to serve under the new commander, Heber MacMahon (qv), bishop of Clogher. MacMahon suffered a crushing defeat at Scarrifhollis, Co. Donegal (21 June 1650), but O'Reilly survived the catastrophe and took up command of the remnants of the Ulster forces. For the next three years he fought a guerrilla campaign against the parliamentarians, and his was the last formal surrender of the war (April 1653). His humane treatment of protestants throughout the conflict convinced the Cromwellians to spare his life.
Hired for Spanish service, he sailed from Waterford to Galicia in May 1653 with 1,000 men, for use in the campaign against Portugal. Unhappy with the conditions he encountered, O'Reilly convinced the authorities in Madrid to transport the regiment to Dunkirk in August 1654. The following year his troops were involved in the first mutiny in the Spanish army in over half a century, although it is not known if O'Reilly played any direct role in these events. The Spanish authorities arrested him in 1660 on charges of corresponding with the Cromwellian regime, seeking terms in order to return home. They disbanded his regiment and distributed the troops elsewhere. O'Reilly's precise date of death is unknown but he was still alive in 1664, having successfully petitioned Philip IV for a military pension.