Sixty coronary artery bypass grafting patients were randomized to receive either magnesium sulphate or placebo for 4 days postoperatively. The magnesium substitution reduced the duration of atrial fibrillation or flutter (p < 0.05), but not the number of patients developing these arrhythmias. The number of ventricular ectopic beats was also reduced among patients receiving magnesium sulphate compared to placebo (p < 0.05). To evaluate whether the anti-arrhythmic effect of magnesium sulphate was explained by a faster resumption of cellular potassium postoperatively, skeletal muscle electrolyte concentrations were measured pre-operatively and on the third day postoperatively. No significant difference was found in skeletal muscle potassium or magnesium contents on the third day postoperatively when comparing the two groups. The serum magnesium level declined postoperatively in the placebo group, whereas an increase was found in patients receiving magnesium sulphate. We suggest magnesium substitution as a routine postoperatively, because this treatment seems to reduce the severity of postoperative arrhythmias.