Irvine contemplated becoming a pastor but was persuaded to enter teaching after completing his own formal education. He joined the faculty of
Franklin & Marshall College as a professor of social science in 1892. He served as both the team's head coach and as a player and team captain. At the age of 28, after only one year of teaching at Franklin & Marshall, Irvine was recruited by the board of regents of what was then Mercersburg College in Mercersburg, Pennsylvania to serve as that institution's president. By Irvine's account, the college was foundering. In July 1893, three months into his tenure, Irvine changed the name of the institution to Mercersburg Academy, establishing a
preparatory school in the model of his alma mater, Exeter, and similar schools throughout
New England. Under Irvine's leadership, Mercersburg Academy developed dramatically. As enrollment increased, Irvine expanded the campus from four acres to over 120, constructing numerous new buildings along the way. The groundbreaking of one such building, the Eighty-eight Dormitory, was attended by
Woodrow Wilson in 1903. Irvine met Wilson at Princeton, where Wilson was a professor and ultimately university president. The two kept in touch after Wilson was elected
President of the United States. Irvine and his wife also enjoyed a relationship with President
Calvin Coolidge and First Lady
Grace Coolidge, whose sons,
John and Calvin, Jr., attended Mercersburg. Grace Coolidge stayed at the Irvines' home when visiting her sons, and the Irvines stayed at the
White House during Calvin Coolidge's presidency. One of Irvine's most ambitious undertakings as headmaster was the construction of a chapel on Mercersburg's campus. Irvine engaged noted architect
Ralph Adams Cram to design the building and spent decades overseeing its planning and construction. Construction was completed in 1926, and the chapel was dedicated to Mercersburg alumni killed in
World War I. Grace Coolidge attended the dedication ceremony. The spire is a replica of that of
University Church of St Mary the Virgin in
Oxford, and it contains a traditional
carillon. Irvine was active in professional associations, serving as president of The Headmasters Association in 1921, president of the
Association of Colleges and Schools of the Middle States and Maryland in 1922, and president of the Headmasters' Club of Philadelphia in 1923. Irvine served as headmaster of Mercersburg for 35 years, until his death in 1928. == Awards and honors ==