Background: Considering limited data on the association between dietary inflammatory index (DII) and demyelinating autoimmune diseases, here, we studied this issue in the early diagnosed patients [e.g., preceding Multiple Sclerosis (MS) diagnosing level (Clinically Isolated Syndrome (CIS), and Radiologically Isolated Syndrome (RIS), MS, and Neuromyelitis Optica Spectrum Disorder (NMOSD)] using a case-control study among the Iranian population. Methods: A total of 291 subjects were selected as the cases (Patients with demyelinating autoimmune diseases including CIS, RIS, MS, and NMOSD, who were diagnosed less than six months before recruitment) and 297 others as controls. A 117-item semi-quantitative food frequency questionnaire (FFQ) was obtained from all of the participants and DII was calculated. Results: After controlling for potential confounders, adherence to a pro-inflammatory diet was associated with a higher risk of demyelinating autoimmune diseases (OR=2.05, 95% CI: 0.51, 3.58), EDSS (OR=2.02, 95% CI: 0.51, 3.53), active plaque (OR=1.90, 95% CI: 0.08, 3.71), higher lesion load (OR=2.11, 95% CI: 0.58, 3.64), LETM (OR=2.19, 95% CI: 0.27, 4.11), higher number of plaques (OR=2.11, 95% CI: 0.58, 3.64), and brain atrophy (OR=2.12, 95% CI: 0.57, 3.67). Conclusion: Our study suggests a possible link between the inflammatory potential of the diet and demyelinating autoimmune disease; however, further prospective cohort studies are needed to draw a causal link on this issue.