Career
He was a native of Newry and became a wholesale and retail grocer in Derry. 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.