The Magnesium Depletion Score (MDS) is a novel indicator that integrates multiple factors to assess systemic magnesium depletion. However, its association with hyperuricemia (HUA) prevalence remains unclear. This study aims to investigate the relationship between MDS and the prevalence of HUA. A cross-sectional analysis was conducted using data from the 2007-2018 National Health and Nutrition Examination Survey (NHANES). The MDS was derived by integrating multiple risk factors associated with magnesium depletion: the use of diuretics and proton pump inhibitors (PPI), estimated glomerular filtration rate (eGFR), and alcohol consumption exceeding recommended thresholds. Univariable and multivariable logistic regression models assessed the association between MDS and HUA. Subgroup and sensitivity analyses, including the exclusion of gout patients, further evaluated this association. Among 18,761 participants, higher MDS were associated with an increased prevalence of HUA. Multivariable logistic regression confirmed a significant positive association between MDS and HUA (OR = 1.73, 95% CI = 1.62-1.84). Restricted cubic splines (RCS) further characterized the non-linear relationship between MDS and HUA prevalence. Subgroup analysis indicated a positive association between MDS and HUA, with significant interactions observed for sex and body mass index. Sensitivity and additional analyses reinforced the robustness of these findings. Among U.S. adults, higher MDS were significantly associated with an increased prevalence of HUA, suggesting that interventions targeting magnesium deficiency could be beneficial in reducing HUA prevalence within this population. However, prospective studies are needed to further confirm these findings.