Gao Y. et al.
CD4 T helper 17 (T17) cells protect barrier tissues but also trigger autoimmunity. The mechanisms behind these opposing processes remain unclear. Here, we found that the transcription factor EGR2 controlled the transcriptional program of pathogenic T17 cells in the central nervous system (CNS) but not that of protective T17 cells at barrier sites. EGR2 was significantly elevated in myelin-reactive CD4 T cells from patients with multiple sclerosis and mice with autoimmune neuroinflammation. The EGR2 transcriptional program was intricately woven within the T17 cell transcriptional regulatory network and showed high interconnectivity with core T17 cell-specific transcription factors. Mechanistically, EGR2 enhanced T17 cell differentiation and myeloid cell recruitment to the CNS by upregulating pathogenesis-associated genes and myelomonocytic chemokines. T cell-specific deletion of Egr2 attenuated neuroinflammation without compromising the host's ability to control infections. Our study shows that EGR2 regulates tissue-specific and disease-specific functions in pathogenic T17 cells in the CNS.