Diet, the most important modulator of inflammatory and immune responses, may affect COVID-19 incidence and disease severity. Data from 196,154 members of the UK biobank had at least one 24 h dietary recall. COVID-19 outcomes were based on PCR testing, hospital admissions, and death certificates. Adjusted Poisson regression analyses were performed to estimate the risk ratios (RR) and their 95% confidence intervals (CI) for dietary inflammatory index (DII)/energy-adjusted DII (E-DII) scores. Models were adjusted for sociodemographic factors, comorbidities, smoking status, physical activity, and sleep duration. Between January 2020 and March 2021, there were 11,288 incident COVID-19 cases, 1270 COVID-19-related hospitalizations, and 315 COVID-19-related deaths. The fully adjusted model showed that participants in the highest (vs. lowest) DII/E-DII quintile were at 10–17% increased risk of COVID-19 (DII: RR Q5 vs. Q1 = 1.10, 95% CI 1.04–1.17, Ptrend < 0.001; E-DII: RR Q5 vs. Q1 = 1.17, 95% CI 1.10–1.24, Ptrend < 0.001) and ≈40% higher risk was observed for disease severity (DII: RR Q5 vs. Q1 = 1.40, 95% CI 1.18–1.67, Ptrend < 0.001; E-DII: RR Q5 vs. Q1 = 1.39, 95% CI 1.16–1.66, Ptrend < 0.001). There was a 43% increased risk of COVID-19-related death in the highest DII quintile (RR Q5 vs. Q1 = 1.43, 95% CI 1.01–2.01, Ptrend = 0.04). About one-quarter of the observed positive associations between DII and COVID-19-related outcomes were mediated by body mass index (25.8% for incidence, 21.6% for severity, and 19.8% for death). Diet-associated inflammation increased the risk of COVID-19 infection, severe disease, and death.