O’Reilly is the third child of a headmaster and a schoolteacher. When he is fifteen he moves to Lancashire and lives with his aunt and uncle. There he becomes a reporter with a local newspaper and joins the 11th Lancashire Rifle Volunteers in 1861. He returns to Ireland in 1863 and enlists with the 10th Royal Hussars in Dublin. However, after realising the way the British are treating his fellow people he leaves the army and joins the Irish Republican Brotherhood around 1865.
In 1866 O’Reilly, along with many other members of the Brotherhood, are arrested and put on trial for treason. O’Reilly is found guilty and sentenced to death however, due to his young age, his sentence is reduced to 20 years penal servitude. He spends a year and a half in some English prisons before being transported to Western Australia in 1867, arriving in 1868.
A month after arriving O’Reilly is moved to the town of Bunbury where he starts receiving attention for protesting the chopping down of a tree. A year after arriving he decides to escape from the colony with the help of a local Catholic priest and some farmers from the nearby town of Dardanup. In February 1869 O’Reilly absconds from his convict camp and makes his way towards the Leschenault Peninsula where he waits for a ship to arrive. After approximately two weeks O’Reilly escapes on the Gazelle bound for the United States, arriving there in November 1869.
O’Reilly moves to Boston and becomes a well-known figure in the town where he becomes involved in civil rights, sports, and Irish American causes. He also becomes part owner of The Pilot newspaper. He publishes four books of poetry – Songs from the Southern Seas (1873), Songs, Legends and Ballads (1878), The Statues in the Block (1881) and In Bohemia (1886). He also publishes a novel Moondyne (1879) based on the convict of the same name and O’Reilly’s experiences in Western Australia. It becomes his most popular work. He also writes one last book of poems entitled Watchwords, which is released after his death.
John Boyle O’Reilly dies in Hull, Massachusetts on August 10, 1890 from heart failure after overdosing on his wife’s medication. His sudden death receives an outpouring of grief and tributes from the Boston community and also globally.
His funeral is held at St. Mary’s Church in Charlestown on August 13 and is attended by thousands. The streets near the church are lined with mourners. His wife does not attend the funeral due to grief and is unable to leave her bed. He is originally buried at Calvary Cemetery in Roxbury, but in November 1890 his remains are exhumed and moved to Holyhood Cemetery in Brookline.