Magnesium depletion was found to occur commonly after cardiac surgery in children and to cause significant neurological and cardiac symptoms. This discovery, in the absence of previous detailed documentation, inspired investigations to determine the relationship of cardiac surgery to changes in magnesium metabolism. A number of patient groups were studied, including both children and adults undergoing various operations. The studies demonstrated an almost universal occurrence of magnesium depletion during and after cardiac surgery, but also demonstrated that supplementation may be preventive. The patterns and aetiology of the changes and their clinical significance are presented and discussed in the light of recent reports from other authors.