There is increasing evidence and case reports regarding proton pump inhibitor (PPI)-induced hypomagnesemia. Our study aimed to clarify the relationship between PPI use and serum magnesium levels and to specify high-risk patients. We retrospectively studied 112 consecutive patients aged 20 years or older who were treated with PPI for ≥30 days and whose serum magnesium levels were available for the PPI treatment period. We compared the mean level of serum magnesium of the enrolled patients with PPI treatment with matched controls. There were no significant differences between the matched PPI users (n = 105) and nonusers (n = 210) in the magnesium levels (0.85 ± 0.09 vs. 0.86 ± 0.16 mM, P = 0.297). In a subgroup analysis of a PPI user group, hypomagnesemia could be observed in 32 patients but not in 80 patients. In multivariate analyses, PPI use for >1 year, age less than 45 years, and concurrent cisplatin or carboplatin use were significantly associated with PPI-induced hypomagnesemia {P = 0.042, odds ratio [OR; 95% confidence interval (CI)]: 5.388 [1.056-27.493]; P = 0.007, OR [95% CI]: 4.710 [1.523-14.571]; P = 0.007, OR [95% CI]: 13.404 [2.066-86.952], respectively} after adjusting for confounders. This study shows that long-term PPI use is associated with hypomagnesemia in hospitalized adult patients. Therefore, serum magnesium levels should be checked before the initiation of PPI treatment and during the treatment period in patients, particularly those concurrently using platinum-based chemotherapy or who are expected to use PPI for long periods.