ABSTRACT: Several studies suggest a link between post-transplant hypomagnesemia and new-onset diabetes after transplantation (NODAT), but this relationship remains controversial. We conducted a retrospective cohort study of 948 nondiabetic kidney transplant recipients from January 1, 2000, to December 31, 2011, to examine the association between serum magnesium level and NODAT. Multivariable Cox proportional hazards models were fitted to evaluate the risk of NODAT as a function of baseline (at 1 month), time-varying (every 3 months), and rolling-average (i.e., mean for 3 months moving at 3-month intervals) serum magnesium levels while adjusting for potential confounders. A total of 182 NODAT events were observed over 2951.2 person-years of follow-up. Multivariable models showed an inverse relationship between baseline serum magnesium level and NODAT (hazard ratio [HR], 1.24 per 0.1 mmol/L decrease; 95% confidence interval [95% CI], 1.05 to 1.46; P=0.01). The association with the risk of NODAT persisted in conventional time-varying (HR, 1.32; 95% CI, 1.14 to 1.52; P<0.001) and rolling-average models (HR, 1.34; 95% CI, 1.13 to 1.57; P=0.001). Hypomagnesemia (serum magnesium <0.74 mmol/L) also significantly associated with increased risk of NODAT in baseline (HR, 1.58; 95% CI, 1.07 to 2.34; P=0.02), time-varying (HR, 1.78; 95% CI, 1.29 to 2.45; P<0.001), and rolling-average models (HR, 1.83; 95% CI, 1.30 to 2.57; P=0.001). Our results suggest that lower post-transplant serum magnesium level is an independent risk factor for NODAT in kidney transplant recipients. Interventions targeting serum magnesium to reduce the risk of NODAT should be evaluated.