He has opted to join former Gillingham manager Mark Stimson at Underhill rather than re-join Gillingham FC. Dennehy negotiated a way out of his Cardiff City contract in the past week.
Stimson told the club website: "His committing to Barnet shows he must like the way I work."
Dennehy has been capped 11 times at under-21 level by the Republic of Ireland.