Objective: Inflammation plays a leading role in the pathogenesis of nephrolithiasis. The association of the dietary inflammatory index (DII) with urinary lithogenic factors is unclear. This study aimed to evaluate the relation of DII to urinary risk factors of kidney stones formation. Results: Of 264 participants, 61.4% (n = 162), 72% (n = 190), 74.6% (n = 197), 68.6% (n = 181), and 80.3% (n = 212) had hyperoxaluria, hypercreatininuria, hypercalciuria, hyperuricosuria, hypocitraturia, respectively. There was a significant increasing trajectory in urinary calcium, uric acid, and creatinine as well as a decreasing trend in urinary citrate across tertiles of DII score (all P = ≤0.001). After multivariate adjustment for energy intake, age, physical activity and body mass index, high DII scores were associated with elevated odds of having hypercreatininuria (OR = 2.80, 95%CI: 1.10-7.12, P trend = 0.04), hypercalciuria (OR = 7.44, 95%CI: 2.62-21.14, P trend ≤ 0.001), hyperuricosuria (OR = 2.22, 95%CI: 1.001-4.95, P trend = 0.05), and hypocitraturia (OR = 5.84, 95%CI: 2.14-15.91, P trend ≤ 0.001). No association was identified between DII and hyperoxaluria.