Leary was born in 1831 in Campbelltown, to John Leary and Catherine, née Jones. His father was convicted of theft and transported to Sydney, arriving in 1816 and subsequently worked as a constable and then publican.[3][4] Both his parents died in November 1846, leaving 5 children orphans when he was 14–15.[5] He was educated at St. Mary's Seminary School, at Sydney College under William Cape, and for two years at the University of Sydney. One brother, George, was secretary to Henry Parkes and William Dalley during their emigration lectures in England and was subsequently clerk of petty sessions in Mudgee.[6]
He married Catherine Keighran on 6 September 1854,[7] and together they had 10 children, 5 daughters and 5 sons.[1]
Leary served his articles under the supervision of Richard Driver and in December 1866 he was admitted an attorney and solicitor of the Supreme Court of New South Wales, with his admission being moved by William Dalley.[11][12] The following month he was appointed one of five commissioners to conduct a Royal Commission to inquire into and report upon the state of lawlessness and crime prevailing in the district of Braidwood.[13] This was in reference to the crimes of the bushrangers the Clarke brothers, and whether police and magistrates had been diligent in seeking to apprehend them. The commission heard evidence from more than 50 witnesses, including Hugh Wallace, a member of the Legislative Council and James Rodd, the member for Goldfields South, which included the Braidwood goldfields. The commissioners reported that Rowland Hassall, one of the magistrates "has refrained from taking any open or active part against the bushrangers or their associates, to preserve himself and his property from outrage and depredation. He has throughout evaded his duty as a Magistrate, by systematically abstaining from adjudicating, or in any way taking part in cases against such offenders or their connections".[14]
The Clarke brothers were arrested in April 1867 and one of Leary's first cases was instructing Dalley in their defence.[15] Both were convicted and sentenced to death. An appeal to the full court of the Supreme Court on a point of law was unsuccessful,[16] and the brothers were executed on 25 June 1867.[17] Leary became a member of the Society for Abolition of Capital Punishment, subsequently serving on its executive.[11]