ObjectiveThe aim of this study was to study the relationship between modified dietary inflammatory index (MDII) score with osteoporosis (OP) in adult Americans.MethodsData were extracted from the United States National Health and Nutrition Examination Survey (NHANES) (2007–2008, 2009–2010, 2013–2014, and 2017–2018). In this cross-sectional study, 5,446 participants were included and analyzed. Potential dietary inflammatory was assessed by MDII score (24-h recall), a composite method computed according to the relationship between nutrients and systemic pro-inflammatory cytokine level, and was further classified into tertiles. Weighted multivariable logistic regression analysis was employed to examine the associations between OP and MDII scores.ResultsIn weighted multivariable-adjusted logistic regression models, the highest tertile of MDII score was associated with an increased risk of OP [odds ratio (OR): 1.73, 95% confidence interval (95 CI%): 1.14–2.63]. In participants aged above 59 years, a higher MDII score showed a higher risk of OP (OR: 1.92; 95 CI%: 1.16–3.15). In the sex-stratified models, the results remained significant only among women (OR: 1.80; 95% CI: 1.02–3.17). In the menopausal status stratified model, after adjusting potential confounding variables, the association between the MDII score, either as a categorical (OR: 1.88; 95% CI: 1.07–3.13) or continuous variables (OR: 1.19; 95%CI: 1.02–1.38), and OP risk was significant among postmenopausal women.ConclusionOur study indicates that a higher MDII score (pro-inflammatory effect) is significantly associated with an increased risk of OP in US adults, especially among those postmenopausal women more than 60 years. This study further supports that those dietary changes have the potential to prevent OP.