He was elected unopposed as Nationalist MP for East Cavan at the 1885 general election and returned unopposed for the same seat in 1886. When the Irish Parliamentary Party split in December 1890 over the leadership of Charles Stewart Parnell, O'Hanlon supported Parnell. However he did not seek re-election in the general election of 1892. He later stood as a candidate for Dublin Corporation in the Rotunda ward on 24 December 1895, but failed by 85 votes to win the seat.
He died of acute pneumonia at his home in North Frederick Street, Dublin, on 7 May 1897, having been attended in the earlier stages of his illness by his former Parnellite Parliamentary colleague Dr J. E. Kenny.
- The Irish Times, 8 May 1897, said that he was ‘about 60’ at the time of his death.
- Irish Times, 26 December 1895.
- Irish Times, 26 December 1895 and 8 May 1897
- The Times (London), 30 June 1886
- Brian M. Walker (ed.), Parliamentary Election Results in Ireland, 1801-1922, Dublin, Royal Irish Academy, 1978
- Hansard 1803–2005: contributions in Parliament by Thomas O’Hanlon
|Parliament of the United Kingdom|
|New constituency||Member of Parliament for East Cavan
1885 – 1892