ScopeInflammation and pyroptosis play important roles in the pathogenesis of multiple sclerosis (MS) and experimental autoimmune encephalomyelitis (EAE). In this study, we evaluated the therapeutic potential of ketogenic diet (KD) in EAE.Methods and resultsThe administration of KD reduces demyelination and microglial activation in the spinal cord of EAE mice. Meanwhile, KD decreases the levels of Th1 and Th17 associated cytokines/transcription factors production (T‐bet, IFN‐γ, RORγt, and IL‐17) and increases those of Th2 and Treg cytokines/transcription factors (GATA3, IL‐4, Foxp3, and IL‐10) in the spinal cord and spleen. Corresponding, KD reduces the expression of chemokines in EAE, which those chemokines associate with T‐cell infiltration into central nervous system (CNS). In addition, KD inhibits the GSDMD activation in microglia, oligodendrocyte, CD31+ cells, CCR2+ cells, and T cells in the spinal cord. Moreover, KD significantly decreases the ratios of p‐JAK2/JAK2, p‐STAT3/STAT3, and p‐STAT4/STAT4, as well as GSDMD in EAE mice.Conclusionsthis study demonstrates that KD reduces the activation and differentiation of T cells in the spinal cord and spleen and prevents T cell infiltration into CNS of EAE via modulating the GSDMD and STAT3/4 pathways, suggesting that KD is a potentially effective strategy in the treatment of MS.