The Nuremberg Code has generally been seen as arising from the Nuremberg Medical Trial. This paper examines developments prior to the Trial, involving the physiologist Andrew Conway Ivy and an inter-Allied Scientific Commission on Medical War Crimes. The paper traces the formulation of the concept of a medical war crime by the physiologist John West Thompson, as part of the background to Ivy's code on human experiments of 1 August 1946. It evaluates subsequent responses by the American Medical Association, and by other war crimes experts, notably Leo Alexander, who developed Ivy's conceptual framework. Ivy's interaction with the judges at Nuremberg alerted them to the importance of formulating ethical guidelines for clinical research.