Mg deficiency induces various metabolic disturbances including glucose metabolism in the liver. However, no comprehensive information is currently available on the metabolic pathways affected by Mg deficiency. The present study examined metabolite content in the liver of Mg-deficient rats using a metabolomic analysis. In this study, 4-week-old, male Sprague–Dawley rats were fed a control diet or a Mg-deficient diet for 8 weeks. The metabolomic analysis identified 105 metabolites in the liver, and significant differences were observed in the hepatic contents for thirty-three metabolites between the two groups. An analysis by MetaboAnalyst, a web-based metabolome data analysis tool, indicated that the Mg deficiency affected taurine/hypotaurine metabolism, methionine metabolism and glycine/serine/threonine metabolism; taurine, hypotaurine, glycine, serine and threonine contents were increased by Mg deficiency, whereas the amounts of 2-ketobutyric acid (a metabolite produced by the catabolism of cystathionine or threonine) and 5'-methylthioadenosine (a metabolite involved in spermidine synthesis) were decreased. The amount of glucose 6-phosphate, a hub metabolite of glycolysis/gluconeogenesis and the pentose phosphate pathway, was significantly decreased in Mg-deficient rats. Mg deficiency also decreased metabolite contents from the citric acid cycle, including citric acid, fumaric acid and malic acid. Aberrant metabolism may be related to the allosteric regulation of enzymes; the mRNA levels of enzymes were generally similar between the two groups. The present study suggests that the Mg deficiency-mediated modulation of hepatic metabolism is as yet uncharacterised.