Some studies have indicated an association between serum magnesium and anemia, but these are primarily limited to research on serum magnesium. Few studies have explored the relationship between the bioavailability of magnesium and anemia. This study explores the association between the Magnesium Deficiency Score (MDS) and anemia among elderly Americans using data from the National Health and Nutrition Examination Survey (NHANES) 2009-2018. Anemia was defined based on World Health Organization criteria, and MDS was calculated considering factors such as the use of diuretics, proton pump inhibitors, alcohol consumption, and renal function status. A total of 3383 individuals were included in our study. Results showed a positive correlation between MDS and anemia, with higher MDS levels associated with increased anemia prevalence. Subgroup analyses revealed that this association was consistent across different genders, PIR, and smoking populations, with a notably strong correlation in the non-Hispanic White group. The study suggests that improving the bioavailability of magnesium to reduce MDS may be a factor in preventing anemia in the elderly. This is the first study to explore the relationship between MDS and anemia in this population, highlighting the potential role of magnesium bioavailability in anemia prevention. Further prospective studies are needed to confirm these results and explore the underlying mechanisms.