Magnesium batteries have garnered significant attention due to the abundant magnesium resources (approximately 3000 times more abundant in the Earth’s crust than lithium) and their high volumetric energy density (3833 mAh/cm
3). Although magnesium anodes exhibit a weaker tendency for dendrite growth compared to conventional lithium batteries, uncontrolled magnesium dendrite growth remains unavoidable under high current densities, posing serious safety risks. In this study, a thermodynamically coupled electrochemical phase-field model is developed within the open-source MOOSE framework to systematically investigate temperature effects on magnesium dendrite growth. The model integrates electrode kinetics, mass transport, interfacial anisotropy, and thermal effects, with the magnesium ion diffusion coefficient characterized using the Arrhenius form. Simulations across 278 K to 350 K reveal that elevated temperatures significantly enhance ion diffusion rates, with diffusion coefficients increasing approximately fivefold from 278 K to 350 K, effectively alleviating concentration polarization at the interface. This timely ion replenishment mitigates localized current density concentration at dendrite tips, promoting a smoother deposition front. As temperature increases, dendritic morphology transitions from sharp needle-like to coarser block-like structures, accompanied by reduced longitudinal growth rates and diminished secondary nucleation. Quantitative analysis shows that under equivalent dendrite length conditions (50 μm), the stable deposition layer thickness at 350 K is approximately seven times greater than at 278 K (increasing from ~6 μm to 42 μm). Thermal regulation achieves a balanced interplay between diffusion processes and electrochemical reaction kinetics, transitioning the deposition mechanism from diffusion-limited to mixed control, effectively suppressing vertical dendrite penetration while enhancing deposit uniformity. This study elucidates the regulatory mechanisms of temperature on magnesium dendrite growth, providing theoretical foundations for optimizing magnesium battery operating conditions, enhancing charging safety, and improving interfacial stability.