O'Hanlon first came to prominence as a hurler with Good Counsel College in New Ross. He played in every grade of hurling before eventually joining the college's senior hurling team. On 14 March 2009, O'Hanlon was at centre-back when Good Counsel College faced Castlecomer Community School in the Leinster final. He scored a point from play and collected a winners' medal following the 1-13 to 2-08 victory. On 13 April2009, O'Hanlon was again at centre-back when Good Counsel College suffered a 1-17 to 1-15 defeat by Thurles CBS in the All-Ireland final.
As a student at University College Dublin, O'Hanlon joined the senior hurling team during his second year. He lined out in several Fitzgibbon Cup campaigns without success.
St. James's
O'Hanlon joined the St. James's club at a young age and played in all grades at juvenile and underage levels as a dual player. He eventually joined the club's top adult teams in both codes. On 15 October 2016, O'Hanlon lined out in defence when St. James's faced Fethard St. Mogue's in the Wexford Intermediate A Championship final. The game ended in a 0-12 apiece draw. O'Hanlon was again at centre-back for the replay a week later and ended the game with a winners' medal following the 2-13 to 0-11 victory.
O'Hanlon first played for Wexford as a member of the minor hurling team during the 2008 Leinster Championship. On 6 July 2008, he came on as a substitute at midfield when Wexford suffered a 1-19 to 0-12 defeat by Kilkenny in the Leinster final. O'Hanlon was once again eligible for the minor grade in 2009 and he became a dual player after also joining the Wexford minor football panel. He lined out in a second successive Leinster final on 5 July 2009, however, Wexford suffered a 1-19 to 0-11 defeat by Kilkenny. On 23 June 2010, O'Hanlon made his first appearance for the Wexford under-21 team when he lined out at centre-back in a 2-17 to 2-13 defeat of Carlow. He was again at centre-back for the Leinster final on 14 July 2010, which Wexford lost to Dublin by 2-15 to 0-15. O'Hanlon became a dual player at under-21 level during the 2011 Leinster Championships. On 6 April 2011, he won a Leinster Championship with the Wexford under-21 football team following their 1-09 to 0-11 defeat of Longford in the final. On 13 July 2011, O'Hanlon was at centre-back when the Wexford under-21 hurling team suffered a 1-18 to 0-11 defeat by Dublin in the Leinster final. O'Hanlon was once again eligible for the under-21 grade in 2011 but was witched to the full-back position with the under-21 hurling team. He played his last game in the grade on 20 June 2012 when Wexford suffered a 3-20 to 4-06 defeat by Kilkenny at the semi-final stage.
Senior
O'Hanlon was just 19-years-old when he was added to the Wexford senior team. He made his first appearance for the team on 13 February 2011 when he lined out at full-back in a 1-24 to 0-06 defeat by Galway in the National League. O'Hanlon made his Leinster Championship debut on 29 May 2011 when he lined out at full-back in a 3-16 to 1-11 defeat of Antrim. On 2 July 2017, O'Hanlon lined out at centre-back in his first Leinster final against Galway. He scored two points from play but ended the game on the losing side following a 0-29 to 1-17 defeat. On 20 January 2018, O'Hanlon was selected on the bench when Wexford faced Kilkenny in the Walsh Cup final. He was introduced as a substitute for Éanna Martin at left wing-back in the 1-24 apiece draw with Kilkenny. Wexford won the subsequent free-taking shoot-out, with O'Hanlon claiming his first silverware at senior level with Wexford. Wexford reached a second Leinster final in three years on 30 June2019. O'Hanlon lined out in his usual position in the half-back line and collected a winners' medal as joint-captain with Lee Chin following the 1-23 to 0-23 defeat of Kilkenny.