McElroy was born in Kentucky to William Thomas Eliza Casseday McElroy. He studied at the University of Leipzig, University of Berlin, Oxford University, and St. John's University, Shanghai, China. He married Louise Robinson Booker McElroy on May 21, 1900; they had two daughters, Katharine Louise McElroy Kent, and Elizabeth Hunt McElroy. In 1898–1916 McElroy was a professor of history at Princeton University. An adamant opponent of "provincial thinking", he was well regarded by historians in the United States and Great Britain, and in 1912 he succeeded Woodrow Wilson as the chair of the Princeton department of history and politics. In 1916–1917 he became the first American professor to teach in China on an official exchange program. In April 1918 McElroy accused practically every citizen in the state of Wisconsin of treason. McElroy was addressing some University of Wisconsin Army junior cadets on behalf of the NSL in the rain on the college's campus. The acoustics made it difficult to hear him, and the wet cadets fidgeted throughout his speech. McElroy grew increasingly angry as he spoke, convinced the cadets were ignoring him. Finally McElroy—whether in exasperation or because he truly believed it—accused the students and the university's faculty of treason. But since no one could hear him, there was no response to his statement. McElroy then broadened his accusation to include the chief justice of the Wisconsin Supreme Court and the entire population of the state of disloyalty as well. To make matters worse, McElroy published these accusations in a number of newspaper articles. When McElroy's statements became widely known, the public and press turned on the NSL and accused it of xenophobia and fanaticism. Many mainstream supporters of the League, unaware of the jingoistic tendencies of some of the more senior members of the organization's inner circle, quit in protest. During the 1920s and 1930s he taught at Oxford University, Cambridge University and other institutions of higher education in the United Kingdom. In 1925–1939 he succeeded Samuel Eliot Morison as the second Harold Vyvyan Harmsworth Professor of American History at Oxford University. He died in Līhu'e, Hawaii and was buried in Princeton Cemetery in Princeton, New Jersey.
Works
Kentucky in the Nation's History
The Winning of the Far West: A History of the Regaining of Texas, of the Mexican War, and the Oregon Question; and of the Successive Additions to the Territory of the United States, Within the Continent of America: 1829–1867, New York: G.P. Putnam's Sons, 1914
The Great Virginia Rebellion of 1676; An Address Delivered by Prof. Robert M. McElroy... before the Society of Colonial Wars in the State of New York on November 9, 1911... under the authority of the Council by the Committee on Historical Documents and the Secretary, November, 1912, New York, 1912
The Ideals of Our War : Address by Robert McNutt McElroy... at Speaker's training camp for education in patriotic service and Conference of organizations engaged in patriotic education, Chautauqua, N.Y., July 3, 1917, New York: National Security League, 1919
The March of Man: A Chronological Record of Peoples and Events from Prehistoric Times to the Present Day, Comprising an Historical Atlas of 96 pages, Comparative Time Charts in Seven Sections and 64 Plates of Illustration, New York: Encyclopædia Britannica, 1935