BACKGROUND:We investigated the association between food-derived dietary magnesium intake and all-cause mortality among adults with chronic kidney disease. METHODS:We analysed data from adults aged ≥20 years with CKD who participated in the National Health and Nutrition Examination Survey between 1999 and 2018. Mortality status was ascertained through linkage to the National Death Index through 31 December 2019. Multivariable Cox proportional hazards models were used to evaluate the association between dietary magnesium intake and all-cause mortality. Restricted cubic spline analysis, Kaplan-Meier survival analysis, subgroup analyses, and sensitivity analyses were also performed. RESULTS:A total of 8,104 CKD patients were included in this cohort study with a median follow-up of 85 months, during which 3,134 (38.7%) died from all causes. In the fully adjusted Cox model, each 100 mg/day increase in dietary magnesium intake was associated with a 7.5% lower risk of all-cause mortality (HR = 0.925, 95% CI 0.881-0.971; P = 0.002). Compared with the lowest quartile, adjusted hazard ratios were 0.978 (95% CI 0.883-1.083) for Q2, 0.904 (95% CI 0.804-1.016) for Q3, and 0.866 (95% CI 0.744-1.007) for Q4, with a significant trend across quartiles (P for trend = 0.036). RCS analysis demonstrated a significant overall association with no evidence of nonlinearity (P for overall association = 0.009; P for nonlinearity = 0.472). Kaplan-Meier analysis showed higher survival probabilities among participants with higher dietary magnesium intake. CONCLUSIONS:Higher dietary magnesium intake was independently associated with a lower risk of all-cause mortality among adults with CKD. These findings suggest that adequate dietary magnesium intake may represent an important nutritional factor associated with prognosis in CKD. Further prospective studies and randomised clinical trials are warranted to determine whether increasing dietary magnesium intake can improve clinical outcomes. SUMMARY STATEMENT:Higher dietary magnesium intake was independently associated with lower all-cause mortality among patients with chronic kidney disease in NHANES 1999-2018. These findings highlight the potential protective role of adequate magnesium intake in improving long-term survival in this population.