Humphrey Francis O'Leary was born at Redwoodtown in the Wairau Valley, Marlborough, on 12 February 1886, the son of Irish parents Mary Falvey and her husband, Humphrey John O'Leary, a blacksmith. Before he reached school age his family moved to Masterton, where his father was later a borough councillor.
Humphrey grew up in a large family. His parents were not well off and worked long hours, but encouraged their children's sporting activities and education. When his father heard that one of his sons was not doing well at the local Catholic school, he sent Humphrey to Masterton Public. From that time, although he remained faithful to the Catholic religion, Humphrey attended state schools. He gained a Wellington Education Board scholarship and Queen's Scholarship in 1899, which enabled him to attend Wellington College. There his academic ability, outgoing personality and sporting prowess made him a popular student. The Queen's Scholarship also paid for three years at university and he enrolled in 1902 to study law at Victoria College.
By working as a law clerk with Phineas Levi, O'Leary was able to study at university for four years. He graduated LLB in February 1908. At Victoria he was president of the students' association and a keen debater, winning the Plunket Medal, with a speech on Lord Nelson, and the Union Prize in 1906 and the Joynt Challenge Scroll, with B. E. Murphy, in 1907. He captained the New Zealand University rugby team against the University of Sydney in 1908 and was in the Victoria College cricket team. Injury in a rugby match against Sydney in 1909 prevented further participation in sport and later disqualified him from war service. He retained his enthusiasm for sport, however, especially rugby, cricket and horse racing.
O'Leary's connections with Victoria continued throughout his life. In 1934 he was elected a graduate representative on the college council, serving as chairman from 1941 to 1946. He was also a member of the Senate of the University of New Zealand from 1943 to 1945.
After graduating, O'Leary remained for two years with Levi and Thomas Wilford, who had become a partner. The firm Wilford and Levi had a large criminal practice and he was encouraged to build up experience as defence counsel in the Magistrate's Court. In order to do more civil work, he went into partnership in 1910 with Frank Kelly. On 23 December 1912 he married Lily Gallagher in Wellington.
O'Leary and Kelly dissolved their partnership in 1914 and O'Leary continued practice on his own account. Possibly because of his Irish working-class origins he was popular in the police courts, where many clients and the police had a similar background. As a defence lawyer he combined a shrewd understanding of human nature with a sincere sympathy for the weak and unfortunate. His humorous style of address made him particularly successful with juries and at one time he had not lost a case in the Magistrate's Court for nine years.
By 1918 he had attained a reputation as a 'young Cicero' in the Wellington Bar. In March of the following year he was invited to join Bell, Gully, Bell and Myers, an old-established Wellington firm. When Michael Myers became a King's counsel in 1922, the firm was renamed Bell, Gully, Mackenzie and O'Leary, with O'Leary taking over the court work, mainly divorce and criminal practice, from Myers.
By this stage the O'Learys had taken into their home the two orphaned children of Lily O'Leary's sister and her husband, who had died in the 1918 influenza epidemic. Then in August 1925, after 12 years of marriage, Lily gave birth to a son.
Humphrey O'Leary was ambitious and hard working. Besides his criminal experience he had a wide knowledge of commercial law. In September 1925 he contributed an article, 'Juries in civil cases', to Butterworth's Fortnightly Notes, forerunner of the New Zealand Law Journal. His lectures on 'Third party claims and the law of negligence' and 'Elements of the law of contracts: with some reference to insurance contracts' were published by the Wellington branch of the Insurance Officers' Guild of New Zealand in 1929 and 1930 respectively.
A traditionalist rather than a radical, O'Leary enjoyed the trappings of the legal profession. Although not a great reader, he had a deep love for the history of the law and built up an extensive library of famous English and Irish trials, biographies and reminiscences. He followed English tradition in always employing male shorthand typists. Notable among these in the 1930s was H. R. C. (later Sir Richard) Wild.
By the early 1930s O'Leary was increasingly concerned with Bench work. In the Hector Gray case of 1932 and 1933 he was appointed an appeal judge by the New Zealand Racing Conference. In 1935 he was made King's counsel and retired from the firm of Bell, Gully. As a KC he was involved in the Hall estate case in Gisborne, regarded at the time by counsel as the longest legal battle on record in New Zealand. His highest profile case was the defence of musician Eric Mareo, who was accused of poisoning his wife. The case attracted huge publicity, but was for O'Leary a bitter disappointment. At the first trial in February 1936 the jury found Mareo guilty of murder and he was sentenced to death. At the retrial, granted by the governor general, in June, O'Leary again led the defence. Convinced of Mareo's innocence, he broke down and cried when the musician was convicted for the second time.
O'Leary had joined the Wellington District Law Society in 1908. From 1918 he was a member of its council and was president in 1921–22. He was a popular speaker and did not lack courage or forthrightness, but his ability to assess which way the wind was blowing contributed to his success. In 1929, perhaps against his natural inclination, he endorsed Michael Myers as chief justice. O'Leary was a member of the New Zealand Council of Law Reporting (1929–46) and on the Council of Legal Education (chairman 1946–53).
In 1935 he became president of the New Zealand Law Society. He was an excellent council chairman and enjoyed wide popularity. In the second year of his term he revived the Dominion Legal Conference, abandoned during the depression years. At the 1938 conference his toast speech was hailed as 'brilliantly witty'. Under his presidency notable measures were carried, including the institution of the disciplinary committee, which he chaired from 1935 to 1946; the modification of the Solicitors' Fidelity Guarantee Fund; and the incorporation of the Council of Law Reporting. A new set of rules for the society and rehabilitation programmes for returned servicemen were also adopted. However, by the end of his 11-year term it was felt by the membership that the council was not taking a strong enough line against government interference in the judiciary, and that the society was overdue for a change.
At the outbreak of the Second World War O'Leary offered his services to the government. He was given a temporary appointment for four months in 1943 as chairman of the War Pensions Appeal Board and served as one of the special tribunals appointed to examine the financial circumstances of conscientious objectors.
When Myers retired as chief justice in 1946 it became known that he did not endorse O'Leary as his successor, and the legend of enmity between the two men developed. O'Leary, who was fiercely ambitious for the post, used every possible means to promote his own cause and defeat his chief rival, G. G. Gibbes Watson. Aged 60, he was appointed chief justice of New Zealand on 12 August 1946 and in 1947 was made a KCMG. It was said at the time of his appointment, 'The Bar will miss the Celtic eloquence'.
O'Leary's seven years as chief justice were his most difficult. He attained the position when proposals for radical alterations in the judicial system were being strongly pressed and vacancies on the Bench were not being filled. He took a conservative approach to change, opposing, for example, the formation of a separate Court of Appeal in 1947.
O'Leary deputised for Governor General Sir Bernard Freyberg for two spells in 1948, and was administrator of the government from August to December 1952 after Freyberg left New Zealand. In 1948 he became an honorary master of the Bench of the Inner Temple and was appointed to the Privy Council. He was sworn in by George VI when the O'Learys visited Britain in 1951. In his mid 60s he developed a heart condition that kept him from the Bench for many months. He died in Auckland on 16 October 1953, survived by his wife and his son, who had joined the priesthood. All tributes to Humphrey O'Leary agreed on his charm and on his generosity in encouraging young lawyers. As one of the best-loved figures in the legal profession of New Zealand, he never lost the common touch.