O'Hegarty was the organizational genius as secretary to the First Dáil (1919–21) and he was determined that the Dáil would demonstrate its worth by ‘functioning as any progressive government would be expected to function’. As clerk of the first Dáil and secretary to the Dáil cabinet (1919–21), he was largely responsible for its success, organising meetings of the clandestine parliament and coordinating the work of various departments from his offices on the corner of O'Connell St. and Abbey St. and later in Middle Abbey St.