Sir Andrew Huxley, who has died aged 94, was one of the great scientists and university administrators of our time – a Nobel laureate, a master of Trinity College, Cambridge, and an exceptionally perceptive and balanced president of the Royal Society.

As a scientist, he possessed unusual breadth which, allied to practical gifts, enabled him to design and make essential and highly specialised experimental equipment. These skills underpinned his pioneering research into nerve function and muscle structure. Huxley was a collaborator and lifelong friend of Sir Alan Hodgkin, and succeeded him as master of Trinity in 1984. They shared the Nobel prize for physiology or medicine in 1963 for unravelling the biophysical mechanism of the nerve impulse. (The Australian Sir John Eccles also shared the prize.)

Huxley was a grandson of Thomas Henry Huxley, the 19th-century biologist who was among Charles Darwin's most outspoken champions, and was half-brother to the biologist Julian Huxley and the novelist Aldous Huxley. When asked whether, with this background, it had been inevitable that he would become a scientist, Huxley declared that in spite of the family connections, the odds were stacked against it. He said: "There must have been 40 or more descendents of TH Huxley older than myself and there were only two scientists before me."

Nevertheless, Huxley recorded that the household of his boyhood, in Hampstead, north London, was imbued with knowledge of science and with a feeling for practical engineering. His father, Leonard, had written the definitive Life and Letters of Thomas Henry Huxley (1900) shortly after his grandfather's death. His mother, Rosalind Bruce (Leonard's second wife), was a very practical person and highly skilled with her hands. There were a couple of old microscopes in the house and, when Huxley was about 12, he and his brother, David, were given a lathe.

Huxley became intensely interested in microscopy and was soon delighted by his ability to design, make and assemble mechanical objects of all kinds. These practical interests stayed with him throughout his life and, in many important ways, provided the bedrock for his innovative research.

Huxley's collaboration with Hodgkin on the nature of nerve impulses began in 1939, when Hodgkin returned from the US to a fellowship at Trinity and Huxley became one of his postgraduate students. At this time there was bitter controversy about the way in which neural signals were generated and transmitted along fibres and across synapses – the connecting junctions where there are gaps between the ends of one fibre and beginning of the next.

Although the notion of a wholly electrical system had been abandoned, and it was being increasingly accepted that signals were transmitted across the junctions chemically, the nature of the signal in the fibre remained mysterious. Received wisdom was that it was electrical, produced by the movement of sodium ions, and that it travelled along the centre of the fibre. But measurements made earlier by Hodgkin at Cambridge, and afterwards by Hodgkin, KS (Kacy) Cole and others in the US, suggested that this view of the nerve fibre as a kind of elongated but simple battery was not tenable. However, finding out what was really happening posed great experimental difficulties. A single electrical pulse in the nerve lasts for only a fraction of a millisecond.

The requirements were therefore close to impossible. Within this very short time, it was necessary to measure the changing electrical potential at different points along a single nerve fibre and to marry information about the spatial dynamics of the electrical potential to the detailed electrochemistry that, across the membrane of the fibre, was actually generating the pulse.

Huxley began working with Hodgkin on this when they were together at the Marine Biological Association laboratory at Plymouth in 1939. Almost before their collaboration had become established, it was abandoned, because of the outbreak of the second world war. Hodgkin was quickly absorbed in radar research with the Air Ministry. Soon afterwards Huxley went into research with anti-aircraft command and with the Admiralty, working with the team that included several physiologists and was built up under Patrick (later Lord) Blackett by AV Hill, to tackle operations research in general, but which also took in such things as radar aids to gunnery.

Physiology training at Cambridge University was deeply involved with physics and mathematics, as well as medicine, and the physiologists therefore found it easy to turn their hands to radar and to the detailed mechanics, ergonomics and psychiatry of war. Yet, in spite of the war and their involvement in widely separated and often secret activities, the former colleagues did not lose touch.

In his autobiography Chance and Design (1992), Hodgkin recalled how, when stuck for a new type of gun sight during the development of airborne radar, he relayed his problem to Huxley, who promptly made some drawings, borrowed a lathe and turned out what was needed. This intuitive perception of problems, coupled with technical flexibility, new skills and knowledge, at least in part, through wartime research, proved highly fruitful when they returned to neurological research at Cambridge in 1946.

Within six years, Huxley and Hodgkin, building their own equipment, had laid the detailed foundations of the modern understanding of the transmission of nerve impulses. They showed that these travel, not along the core of the fibre, but along the outer membrane as a product of successive cascades of two types of ion. The finding and the detailed mathematical theory that accompanied the work was revolutionary and resulted in their share of the Nobel prize.

When this work was completed in 1952, Huxley was teaching physiology at Cambridge. Among other things, he had become interested in a difficult and, at that time, unexplained phenomenon: how does muscle contract? To carry research forward, it was necessary to find ways of observing exactly how the network of filaments in individual muscle fibres behaved during contraction, a problem which Huxley saw called for a new kind of microscope. This was a challenge he could not resist.

It happened that, in the years immediately after the war, he had done preliminary design work on a form of interference microscopy which, initially, he thought was entirely new. It turned out that not only were others thinking along the same lines, but that proposals for similar types of instrument had been made half a century earlier. Huxley often used this example to show how quickly valuable scientific and technological ideas can be forgotten if they are incomplete or unexploited.

The development Huxley had in mind would enable different parts of a single striated muscle fibre to be distinguished far more easily and with greater precision than can be attained by conventional microscopy. He was, he discovered, ahead of the field. He therefore designed and built his own microscopes and used them to investigate the mechanism of contraction and to develop in 1954 the "sliding filament" theory. (By coincidence, his younger namesake and contemporary, Hugh E Huxley, who was unrelated, came to similar conclusions at about the same time).

Born in Hampstead, Huxley went to University College school and then Westminster, where he was inspired by the science teaching, especially the physics under JF Rudwick. At Trinity, he became involved with the Natural Science Club, which had among its members several future Nobel prizewinners. As an undergraduate, Huxley found inspiration in continuous contact with postgraduate research and later worked to prevent separation being imposed through the establishment of postgraduate institutes.

Director of studies at Trinity from 1952 until 1960, he was Jodrell professor of physiology at University College London from 1960 until 1969, then held a Royal Society research professorship in the department of physiology at UCL from 1969 until 1983. He was elected a fellow of the Royal Society in 1955, knighted in 1974 and made a member of the Order of Merit in 1983.

The balance, strength and caution of Huxley's gentle and peaceful personality emerged most clearly when he was president of the Royal Society, from 1980 until 1985, a period during which science in Britain was under pressure from the government. He was carefully but sharply outspoken on many issues of scientific structure, the university role, and the need for long-term stability in the national research base.

Huxley married Richenda Pease in 1947. She died in 2003. He is survived by their son, Stewart, and five daughters, Janet, Camilla, Eleanor, Henrietta and Clare.

• Andrew Fielding Huxley, physiologist and biophysicist, born 22 November 1917; died 30 May 2012

Anthony Tucker died in 1998