The purpose of the study was to examine whether magnesium (Mg) depletion score (MDS) and dietary Mg intake are associated in adults with the risk of developing Parkinson's disease (PD). In this study, we analyzed data from the National Health and Nutrition Examination Survey (NHANES), which included 20,010 adults aged over 40 years old. To evaluate the linear association between PD and dietary intake of Mg or MDS, we conducted weighted logistic regression for univariate analysis and multivariate linear regression models. Odds ratios (OR) and 95% confidence intervals (CI) were estimated using logistic regression models. A restricted cubic spline (RCS) was drawn to visualize the nonlinear relationship between MDS/dietary Mg intake and PD. In addition, we examined the variations in the relationship between MDS and PD across different confounding factors of the association using subgroup analysis. There were 240 PD cases (1.2%), and 19770 non-PD were included in the study. We found that a higher MDS was associated with an increased risk of PD after adjusting for covariates (OR per 1-unit increase, 1.47; 95% CI, 1.16-1.86). There is insufficient evidence to support a significant statistical association between Mg intake and the risk of PD. According to nonlinear regression, high MDS was associated with higher odds of PD and lower odds of PD above 250 mg/day intake of Mg. It has been shown that Mg bioavailability may be negatively associated with PD as measured by MDS. MDS is a potential method for screening the population with PD. Maintaining adequate Mg status may be important for PD prevention.