Hegarty first came to prominence as a hurler with Castletroy College. On 19 October 2011, he was a forward on the first Castletroy College team to play in the Harty Cup.
Hegarty joined the St. Patrick's club at a young age and played in all grades as a dual player at juvenile and underage levels. On 12 October 2014, Hegarty was at full forward when St. Patrick's were defeated by Ballylanders in the final of the Limerick Football Championship.
Inter-county
Under-21
Hegarty first played for Limerick as a Gaelic footballer with the under-21 team. He made his first appearance in a 3-15 to 0-08 Munster Championship defeat by Cork on 19 March 2014. Hegarty became a dual under-21 player in 2015 and won a Munster Championship medal after a 0-22 to 0-19 win over Clare in the final. On 12 September 2015, Hegarty was at midfield when Limerick defeated Wexford by 0-26 to 1-07 in the All-Ireland final.
Senior
Hegarty first played at senior level as a member of the Limerick senior football team. He made his first appearance in a 2-11 to 0-11 defeat of Longford in the National Football League on 9 February 2014. Hegarty later made his first championship start on a 2-14 to 1-11 defeat by Tipperary in the Munster Championship. Hegarty played in the early rounds of the NationalFootball League in 2016 before joining the Limerick senior hurling team. He made his first appearance for the hurlers on 13 March 2016, replacing Seánie O'Brien at half-time in a 6-29 to 1-12 defeat of Laois at the Gaelic Grounds. Hegarty later made his first championship appearance in a 3-12 to 1-16 defeat by Tipperary. In 2017 Hegarty left the Limerick senior football team and committed solely to the hurlers after an end to the facilitating of dual players. On 19 August 2018, Hegarty was at right wing-forward when Limerick won their first All-Ireland title in 45 years after a 3-16 to 2-18 defeat of Galway in the final. He ended the season by being nominated for an All-Star Award. On 31 March 2019, Hegarty was selected at right wing-forward for Limerick's National League final meeting with Waterford at Croke Park. He collected a winners' medal after scoring three points from play in the 1-24 to 0-19 victory. On 30 June 2019, Hegarty won a Munster Championship medal after scoring three points from right wing-forward in Limerick's 2-26 to 2-14 defeat of Tipperary in the final.