The dietary glycemic load (GL) indicates the quantity and quality of carbohydrates, which can affect ovulation and fertility by controlling insulin sensitivity. Also, past studies confirm the role of the dietary inflammatory index (DII) in many diseases, including metabolic syndrome and cardiovascular disorders, so it may be related to reproductive health. This case–control study aims to study the association between glycemic index (GI), GL, and DII with infertility in women. This study was conducted on 300 infertile women in the case group and 300 fertile women in the control group in Kermanshah, Iran. Food intake was evaluated using FFQ, and using NUTRITIONIST IV software programs, GI and GL values were determined. DII was computed as well using FFQ data. Physical activity was assessed using IPAQ‐SF. The association between GI, GL, and DII with infertility was evaluated using a logistic regression test, using STATA version 14 software. The results showed that the DII, GI, and GL were higher in the case group compared to the control group ([p = .009], [p = .0001], and [p = .0007], respectively). The increase in GI, GL, and DII caused an increase in infertility factors, and consequently enhanced chance of infertility ((adjusted odd ratio [OR] 2; 95% confidence interval [CI], 1.16, 3.45), (OR 3.68; 95% CI, 1.99, 6.82), and (OR 1.7; 95% CI, 0.97, 2.95), respectively). The present study indicated that the chance of infertility is higher in women who follow a diet with high GI, GL, and DII. Therefore, a positive association may be present between GI, GL, and DII with infertility.