He studied both law and medicine but did not take a degree and for his involvement in the Irish Republican Brotherhood, he was imprisoned in England during the nineteenth century.
[1] He began his studies in law at Trinity College, Dublin, in 1847, where, through the Grattan Club, he associated with Charles Gavan Duffy, James Fintan Lalor and Thomas Francis Meagher.
After the failure of the 1848 Tipperary Revolt, O'Leary attempted to rescue the Young Ireland leaders from Clonmel Gaol, and was himself imprisoned for a week from 8 September 1849.
In 1855, he visited Paris, where he became acquainted with Kevin Izod O'Doherty, John Martin and the American painter, James Abbott McNeill Whistler.
During his exile, he lived mainly in Paris, also visiting the United States, remained active in the IRB and its associated organisations, and wrote many letters to newspapers and journals.
He and his sister, the poet Ellen O'Leary, both became important figures within Dublin cultural and nationalist circles, which included W. B. Yeats, Maud Gonne, Rose Kavanagh, Rosa Mulholland, George Sigerson, and Katharine Tynan.
In an article published in the Dublin University Review in 1886, he showed some awareness that Protestants would require guarantees of their liberties within an independent Ireland.