As a young man Irvine worked as a hatter, but in 1760 he enrolled in Samuel Atlee's provincial Pennsylvania unit and served in the French and Indian War. He spent most of his time along Pennsylvania's northern frontier. In 1763 he was promoted to captain. The following year, during Pontiac's Rebellion, he served with Henry Bouquet's expedition into the Ohio Country.
After returning to the battlefield Irvine was captured by the British in a skirmish at Chestnut Hill, near Philadelphia, on December 5, 1777. He suffered neck injuries and lost three of the fingers on his left hand in the fight. He was held prisoner by the British for nearly four years, first in New York and then in Flushing. He was released June 1, 1781. He was active in planning the defense of Philadelphia against suspected British attack.
After the war, he held the rank of major general in the Pennsylvania militia from 1782 to 1793.
Political career
Irvine served on the Supreme Executive Council of the Commonwealth of Pennsylvania, from 1782 to 1785, representing the City of Philadelphia. His party affiliation was Constitutionalist. On November 6, 1784 he defeated John Neville in the election for the Vice-Presidency of Pennsylvania, a position analogous to the modern office of Lieutenant Governor. He resigned the office on October 10, 1785 and was succeeded by Charles Biddle. No reason for his resignation appears in the Minutes of the Executive Council. Irvine served in the Pennsylvania General Assembly during the 1785–1786 term. In 1786 the Constitutionalist party lost much of its support and Irvine's political career suffered. He did, however, serve in the State Senate from 1795 to 1799.