Background High dietary magnesium intake may reduce insulin resistance (IR) and metabolic syndrome (MetS). However, previous studies were inconsistent in Asian population and there have been no study about the mediation of IR in the relationship between dietary magnesium intake and MetS. Thus, this cross-sectional analysis aimed to evaluate the association between dietary magnesium intake, IR and MetS using data from China Health and Nutrition Survey. Methods Dietary magnesium intake was defined as daily dietary magnesium intake divided by body weight. Logistic regression analysis was used to calculate the odds ratio (OR) for IRand the prevalence of MetS across the quartile categories of dietary magnesium intake. Results 8,254 participants were included in final analysis. We found a significant negative association between dietary magnesium intake and IR, the multivariable-adjusted OR for HOMA-IR comparing the highest to the lowest quartile of dietary magnesium intake was 0.435 (95% confidence intervals (CI) 0.376 to 0.502). The prevalence of the MetS was 33.5%, 24.9%, 18.4% and 13.4% for increasing quartiles of dietary magnesium intake (p <0.001). The direct effect and indirect effect of dietary magnesium on MetS was found significant, and the calculated percentage of mediation was 23.0%. Conclusion Our study demonstrated a significant and independent negative relationship among weight adjusted dietary magnesium intake, HOMA-IR and MetS in a large Chinese population. IR partly mediated the relationship between dietary magnesium intake and MetS.Keywords: diet magnesium intake; metabolic syndrome; insulin resistance; Chinese population; mediation effect