To determine the correlations between dietary and blood inflammation indices in elderly Americans and their effects on cognitive function. This research extracted data from the 2011-2014 National Health and Nutrition Examination Survey for 2,479 patients who were ≥60 years old. Cognitive function was assessed as a composite cognitive function score (Z-score) calculated from the results of the Consortium to Establish a Registry for Alzheimer's Disease Word Learning and Delayed Recall tests, the Animal Fluency test, and the Digit Symbol Substitution Test. We used a dietary inflammatory index (DII) calculated from 28 food components to represent the dietary inflammation profile. Blood inflammation indicators included the white blood cell count (WBC), neutrophil count (NE), lymphocyte count (Lym), neutrophil-lymphocyte ratio (NLR), platelet-lymphocyte ratio (PLR), neutrophil-albumin ratio (NAR), systemic immune-inflammation index [SII, calculated as (peripheral platelet count) × NE/Lym], and systemic inflammatory response index [SIRI, calculated as (monocyte count) × NE/Lym]. WBC, NE, Lym, NLR, PLR, NAR, SII, SIRI, and DII were initially treated as continuous variables. For logistic regression, WBC, NE, Lym, NLR, PLR, NAR, SII, and SIRI were divided into quartile groups, and DII was divided into tertile groups. After adjusting for covariates, WBC, NE, NLR, NAR, SII, SIRI, and DII scores were markedly higher in the cognitively impaired group than in the normal group (p < 0.05). DII was negatively correlated with the Z-score when combined with WBC, NE, and NAR (p < 0.05). After adjusting for all covariates, DII was positively correlated with SII in people with cognitive impairment (p < 0.05). Higher DII with NLR, NAR, SII, and SIRI all increased the risk of cognitive impairment (p < 0.05). DII was positively correlated with blood inflammation indicators, and higher DII and blood inflammation indicators increased the risk of developing cognitive impairment.