Regulation of the intracellular free magnesium concentration ([Mg2+]i) was investigated in isolated rat hearts, using 31P-nuclear magnetic resonance (31P-NMR). [Mg2+]i was found to be slowly and significantly decreased during prolonged application of isoproterenol (ISO) through beta-adrenergic receptor stimulation, and restored by subsequent washouts. The ISO-induced decrease in [Mg2+]i was antagonized by addition of a muscarinic receptor agonist, carbachol (CCh). In the presence of atropine, CCh did not exert this effect. A water-soluble forskolin derivative, NKH477, which directly activates adenylate cyclase, also caused a decrease in [Mg2+]i, which could be antagonized by CCh, but a greater concentration was required as compared to the ISO case. The manner of [Mg2+]i regulation mimicked those noted for the action potential duration and the Ca2+ channel current, in which cAMP is known to act as a second messenger. Even in the presence of a Ca2+ channel blocker, verapamil, [Mg2+]i was reversibly decreased by ISO. Changes in the intracellular ATP concentration demonstrated any clear correlation with changes in [Mg2+]i. These results suggest that [Mg2+]i can be controlled by a balance of sympathetic and parasympathetic activities. cAMP may play a key role in the [Mg2+]i regulation via beta-adrenergic and muscarinic receptors, although some other metabolic pathways also appear to be involved. Hormonally induced changes in [Mg2+]i have possible clinical significance.