Here, we report that sexual dimorphism in MS is associated with estrogen-mediated changes in the gut microbiome, ME and LGCI, and that 17β-estradiol (17β-E) (E2) treatment prevents MS in male and ovariectomized (OVX) mice by altering gut microbiome and intestinal alkaline phosphatase (IAP), a major gut microbiota-modifying enzyme. This evidence concerns the gene ALPI and myeloid sarcoma.