Magnesium (Mg2+) plays pleiotropic roles in cellular biology, and it is essentially required for all living organisms. Although previous studies demonstrated intracellular Mg2+ levels were regulated by the complex of phosphatase of regenerating liver 2 (PRL2) and Mg2+ transporter of cyclin M (CNNMs), physiological functions of PRL2 in whole animals remain unclear. Interestingly, Mg2+ was recently identified as a regulator of circadian rhythm-dependent metabolism; however, no mechanism was found to explain the clock-dependent Mg2+ oscillation. Herein, we report PRL2 as a missing link between sex and metabolism, as well as clock genes and daily cycles of Mg2+ fluxes. Our results unveil that PRL2-null animals displayed sex-dependent alterations in body composition, and expression of PRLs and CNNMs were sex- and circadian time-dependently regulated in brown adipose tissues. Consistently, PRL2-KO mice showed sex-dependent alterations in thermogenesis and in circadian energy metabolism. These physiological changes were associated with an increased rate of uncoupled respiration with lower intracellular Mg2+ in PRL2-KO cells. Moreover, PRL2 deficiency causes inhibition of the ATP citrate lyase axis, which is involved in fatty acid synthesis. Overall, our findings support that sex- and circadian-dependent PRL2 expression alter intracellular Mg2+ levels, which accordingly controls energy metabolism status.