Magnesium is a prominent intracellular cation required for the function of hundreds of enzyme systems. Magnesium depletion is observed frequently in hospitalized patients and is usually secondary to renal or intestinal magnesium loss. Clinically, magnesium deficiency may present with neuromuscular hyperexcitability, hypocalcemia, hypokalemia, and cardiac arrhythmias. Magnesium therapy appears to improve survival in patients with myocardial infarction. The diagnosis of magnesium deficiency is usually made by a low-serum magnesium concentration, although the magnesium tolerance test may be more indicative of low magnesium states. In acutely ill patients, magnesium is usually give parenterally; oral magnesium may be given for long-term repletion.