Experimental autoimmune encephalomyelitis (EAE) is an appropriate model for the study of the immunologic and pathologic mechanisms in multiple sclerosis (MS). According to the hygiene hypothesis, helminths can improve immunoregulation and have therapeutic effects on immune‐mediated diseases. In this study, we used Dicrocoelium dendriticum (Dicrocoeliidae, Platyhelminthes) eggs for the evaluation of their prophylactic and treatment effects on EAE disease. D. dendriticum eggs were extracted. Female C57BL/6 mice were immunized with the specific antigen MOG35−55, and then the egg extracts were utilized for prophylaxis and/or treatment. Clinical symptoms and other relevant parameters were assessed daily. The mRNA expression of transforming growth factor‐β (TGF‐β), interleukin‐10 (IL‐10), IL‐6, IL‐23 and IL‐17 were assessed with a real‐time polymerase chain reaction technique. Furthermore, secretion of TGF‐β and IL‐17 cytokines were determined by enzyme‐linked immunosorbent assay. Data indicated that clinical symptoms in prophylaxis and treatment groups were decreased significantly in comparison with the untreated control group (p < .001). Our results showed a significant decrease in IL‐17, as well as an increase in TGF‐β cytokine in the treatment group compared to the EAE control group (p < .01). Furthermore, in the prophylaxis and treatment groups, the mRNA expression of disease‐associated cytokines decreased and the mRNA expression of the anti‐inflammatory cytokines increased. In this study, the D. dendriticum egg ameliorates the clinical symptoms of the EAE model through the modulation of related cytokines of Th17 and Treg cells. Therefore, using this parasite egg could be a new treatment for MS.