John George Repplier McElroy, the son of Archibald McElroy and Sophia Maria (Repplier) McElroy, was born in Philadelphia on June 30, 1842. In 1858 he entered the University of Pennsylvania as a member of the College Class of 1862. As a Penn student, he received numerous awards, including Greek and Latin prizes before graduating second in his class in 1862.
After graduation, McElroy taught at the Rittenhouse Academy in Philadelphia before becoming a teacher in the Chicago public schools in 1866. On November 2, 1869, McElroy married Anna Baldwin Clayton, eldest daughter of John Clayton, A.B. 1837, LL.B. 1852. John and Anna McElroy had four children: Clayton, Katherine Allgaire, George Baldwin, and Cecilia Baldwin.
In 1869, the same year as his marriage, McElroy became an assistant professor of Greek and history at the University of Pennsylvania. He held this position until 1876 when he became professor of rhetoric and English language, a position he held until his death on November 26, 1890. Professor McElroy was the author of A System of Punctuation (1878), How to Tell the Parts of Speech (1881), The Structure of English Prose (1885), and several other books and articles.