BackgroundA link between food-induced inflammation and common chronic diseases has been identified in studies. However, there was uncertainty about the influence of dietary inflammatory potential on the risk of chronic kidney disease (CKD) among middle-aged and older groups. Our research aimed to examine the connection between dietary inflammatory index (DII) to CKD in people aged 40 years and older.MethodsThis study comprised ten cycles of the National Health and Nutrition Examination Survey (NHANES) from 1999 to 2018. Linear associations of DII with CKD, low-eGFR, and albuminuria were examined using multiple logistic regression, whereas non-linear associations were assessed by smoothed curve fitting. Besides, we conducted subgroup analyses and interaction tests.ResultsOf the 23,175 middle-aged and older individuals, a total of 5,847 suffered from CKD, making up 25.23% of all participants. After adjustment for all covariates, we found that increased DII scores were positive with an increased hazard of CKD (OR = 1.08, 95% CI: 1.05, 1.10, p < 0.0001), and the same was shown between DII and low-eGFR (OR = 1.16, 95% CI: 1.13, 1.19, p < 0.0001). After further converting DII into categorical variables, the above relationship still existed. These relations were consistent in different ages, genders, BMI, whether smoking, whether suffering from hypertension, and whether suffering from diabetes, with no significant stratification differences (all P for interaction >0.05). Surprisingly, we did not find a statistically significant correlation of DII to albuminuria after complete adjustment for covariates (OR = 1.02, 95% CI: 1.00, 1.05, p = 0.0742). Even when DII was considered as a categorical variable, this relation was still not statistically significant. Furthermore, we found an association in the shape of a U between DII and low-eGFR in the fully adjusted model, with a turning point at a DII of 1.6.ConclusionOur findings indicated that middle-aged and older persons with greater levels of DII had a significantly higher risk of CKD.