Proton pump inhibitors (PPIs) are used by millions of patients for the treatment of stomach acid‐reflux diseases. Although PPIs are generally considered safe, about 13% of the users develop hypomagnesemia. Despite rising attention for this issue, the underlying mechanism is still unknown. Here, we examine whether the gut microbiome is involved in the development of PPI‐induced hypomagnesemia in wild‐type C57BL/6J mice. After 4 wk of treatment under normal or low dietary Mg2+ availability, omeprazole significantly reduced serum Mg2+ levels only in mice on a low‐Mg2+ diet without affecting the mRNA expression of colonic or renal Mg2+ transporters. Overall, 16S rRNA gene sequencing revealed a lower gut microbial diversity in omeprazole‐treated mice. Omeprazole induced a shift in microbial composition, which was associated with a 3‐ and 2‐fold increase in the abundance of Lactobacillus and Bifidobacterium, respectively. To examine the metabolic consequences of these microbial alterations, the colonic composition of organic acids was evaluated. Low dietary Mg2+ intake, independent of omeprazole treatment, resulted in a 10‐fold increase in formate levels. Together, these results imply that both omeprazole treatment and low dietary Mg2+ intake disturb the gut internal milieu and may pose a risk for the malabsorption of Mg2+ in the colon.—Gommers, L. M. M., Ederveen, T. H. A., van der Wijst, J., Overmars‐Bos, C., Kortman, G. A. M., Boekhorst, J., Bindels, R. J. M., de Baaij, J. H. F., Hoenderop, J. G. J. Low gut microbiota diversity and dietary magnesium intake are associated with the development of PPI‐induced hypomagnesemia. FASEB J. 33, 11235–11246 (2019). http://www.fasebj.org