ABSTRACT Background Overactive bladder (OAB) is a common urinary condition, with multiple contributing factors. Dietary factors affecting inflammation and oxidative stress are increasingly recognized as significant triggers. This study investigates the associations between the Dietary Inflammatory Index (DII), the Comprehensive Dietary Antioxidant Index (CDAI), and OAB in adults. Methods Data from the 2011–2018 National Health and Nutrition Examination Survey (NHANES) was analyzed. The DII and CDAI were calculated based on nutrient intake, and OAB was assessed using the Overactive Bladder Symptom Score (OABSS). Weighted multivariable logistic regression models were applied to evaluate associations, and subgroup analysis and restricted cubic spline (RCS) analysis were used to explore potential interactions and dose–response relationships. Additional analyses were performed to examine the associations of DII and CDAI with dry and wet OAB subtypes. Results Patients with OAB exhibited higher DII scores and lower CDAI scores. Increased DII was significantly associated with an elevated risk of OAB, particularly in the highest quartile (OR = 1.55, 95% CI: 1.19–2.02, p = 0.001). In contrast, higher CDAI was associated with a reduced risk of OAB (OR = 0.68, 95% CI: 0.53–0.88, p = 0.004). Subgroup analysis revealed significant interactions with age and alcohol intake. RCS analysis confirmed a positive linear relationship between DII and OAB risk, and a negative linear relationship between CDAI and OAB risk. Further stratified analysis showed that the association between DII and OAB was stronger in wet OAB than in dry OAB, whereas CDAI showed no significant association with either subtype. Conclusion A diet with low inflammatory potential and rich in antioxidants may reduce the risk of OAB, particularly in younger individuals and heavy drinkers. Dietary modification presents a practical approach for OAB management, warranting further research to establish causality and inform intervention strategies.