Before becoming the assistant manager to Stephen Kenny at Derry City in 2005, Hegarty had a spell of management at Institute. His fiery temper and desire for his team to do well was evident during every game. This driven and determined attitude is reminiscent of the character Hegarty displayed on the field as a player. While at Derry, Hegarty was ever present on the sidelines as the club went on to win the FAI Cup, finish second in the League of Ireland and enjoyed an historic run in the UEFA Cup, being eliminated in the First Round by Paris St. Germain. On 15 December 2006 Hegarty announced that he would be moving on from his role as assistant manager at Derry due to difficulties in relation to Pat Fenlon's new training schedules for the 2007 season. With the managerial slot left empty at Finn Harps since Anthony Gorman's departure, Hegarty looked like the favourite to take the role at Finn Park. On 20 December 2006 Hegarty was named the new boss at Finn Harps after signing a two-year deal with the club.