Although case reports link proton-pump inhibitor (PPI) use and hypomagnesemia, no large-scale studies have been conducted. Here we examined the serum magnesium concentration and the likelihood of hypomagnesemia (<1.6 mg/dl) with a history of PPI or histamine-2 receptor antagonist used to reduce gastric acid, or use of neither among 11,490 consecutive adult admissions to an intensive care unit of a tertiary medical center. Of these, 2632 patients reported PPI use prior to admission, while 657 patients were using a histamine-2 receptor antagonist. PPI use was associated with 0.012 mg/dl lower adjusted serum magnesium concentration compared to users of no acid-suppressive medications, but this effect was restricted to those patients taking diuretics. Among the 3286 patients concurrently on diuretics, PPI use was associated with a significant increase of hypomagnesemia (odds ratio 1.54) and 0.028 mg/dl lower serum magnesium concentration. Among those not using diuretics, PPI use was not associated with serum magnesium levels. Histamine-2 receptor antagonist use was not significantly associated with magnesium concentration without or with diuretic use. The use of PPI was not associated with serum phosphate concentration regardless of diuretic use. Thus, we verify case reports of the association between PPI use and hypomagnesemia in those concurrently taking diuretics. Hence, serum magnesium concentrations should be followed in susceptible individuals on chronic PPI therapy.