Alfred Hyde Cockayne was born on 23 May 1880 in Dunedin or Oamaru. His parents, Leonard Cockayne and Maria Maude Blakeley, married in February 1881. Leonard went on to become an internationally noted botanist, and his broad appreciation of botany and his interest in man's complex interaction with the environment were to be guiding influences for his son.
Although both his parents were teachers, Alfred received no formal schooling. He taught himself French and Latin and presumably received some grounding in science from his father. After matriculating in 1900, he entered Canterbury College and received a certificate in biology in 1902. He spent four years working in the college's biological laboratory, then in 1904 he joined the Department of Agriculture as assistant biologist. His early work impressed and in 1909 he was made departmental biologist. He married Isabella Campbell Hutton at Wellington on 27 April 1909; they were to have two daughters.
Cockayne began to make a mark on departmental strategy. The study of plants and grasses was at that time in its infancy, and rather than simply provide analysis and promote overseas findings he began to research New Zealand grasslands and their role in animal production. One of his prominent early studies examined the impact of regular burning of South Island tussocks, and determined that the practice had a long-term detrimental impact on soil fertility and hence animal production.
Cockayne envisaged that New Zealand's temperate climate would sustain grass-based sheep and cattle farming without the reliance on fodder crops so much in evidence at the turn of the century. As early as 1910 he stressed the need for grass pasture improvement. In 1911 he took under his wing a young cadet, Bruce Levy, who carried out much of the research that was to confirm Cockayne's theories. Their collaboration produced results of great significance for New Zealand's pastoral farming.
In 1917 he moved to the department's Central Development Farm at Weraroa, Levin. Cockayne believed that, as much as possible, research should be undertaken on the land and that results should be made immediately available through advisers talking to farmers directly. Following a departmental reorganisation in 1919, Cockayne successfully argued for the re-establishment of the Fields Division, which was charged with the task of bringing new information on grassland farming techniques to farmers. With the other staff of the biological laboratory, he moved to Wellington in 1920. In 1923 he became director of the Fields Division and in 1928 he moved it from Wellington to Palmerston North, near Massey Agricultural College. The move proved propitious because within two years the division's grasslands research team, headed by Levy, had isolated a strain of truly perennial ryegrass and two white clovers with enhanced nitrogen-fixing capability. These discoveries were fundamental to the rapid expansion of pastoral production during the 1930s, particularly on dairy farms and on the plains. The new grass strains were adopted on hill-country farms after the advent of aerial topdressing.
In 1929 Cockayne was appointed assistant director general of the Department of Agriculture; he remained director of the Plant Research Station. Two years later he founded the New Zealand Grassland Association, and remained president until 1948. Cockayne's split responsibilities at a time of retrenchment frustrated some of his researchers. There had been tension for some time, particularly between G. H. Cunningham, who wanted the station to be under the control of the DSIR, and Cockayne, who insisted that it be involved with the Department of Agriculture's extension work. The tension was exacerbated by Cockayne's move to Wellington on his appointment as assistant director general. Cunningham resigned in November 1935 in an attempt to force the government's hand. As part of a reorganisation in April 1936 the plant station was transferred to the control of the DSIR.
On the retirement of C. J. Reakes in 1936, Cockayne became director general of agriculture. He oversaw the reinvigoration of the department after the depression and instigated the formation of the Animal Research Division. His final years as director general were dominated by his role as wartime primary industries controller, which arose from the department's responsibility for ensuring that agricultural production was maintained to supply Britain. He also chaired the National Council of Primary Production, a wartime expedient designed to help the government communicate with farmers and to give the farming community a say in the development of rationing.
Cockayne retired in 1943. He spent two years as the chairman of the New Zealand School of Agriculture (Massey and Canterbury Agricultural Colleges), and served on the Senate of the University of New Zealand. He was made an ISO in 1937 and a CBE in 1957. He was the first life member of the New Zealand Grassland Association and the recipient of its award in 1962 for a lifetime of service. Cockayne was not especially affable, speaking 'as if each sentence was an undisputable fact and not open to contradiction'. He was notoriously untidy. Yet as administrator and scientist he had made a significant contribution to the scientific development of pastoral farming in New Zealand. He died at Waikanae on 21 October 1966, survived by his two daughters; Isabella Cockayne had died in 1961.