Multiple sclerosis is a chronic inflammatory disease of the CNS1. Astrocytes contribute to the pathogenesis of multiple sclerosis2, but little is known about the heterogeneity of astrocytes and its regulation. Here we report the analysis of astrocytes in multiple sclerosis and its preclinical model experimental autoimmune encephalomyelitis (EAE) by single-cell RNA sequencing in combination with cell-specific Ribotag RNA profiling, assay for transposase-accessible chromatin with sequencing (ATAC–seq), chromatin immunoprecipitation with sequencing (ChIP–seq), genome-wide analysis of DNA methylation and in vivo CRISPR–Cas9-based genetic perturbations. We identified astrocytes in EAE and multiple sclerosis that were characterized by decreased expression of NRF2 and increased expression of MAFG, which cooperates with MAT2α to promote DNA methylation and represses antioxidant and anti-inflammatory transcriptional programs. Granulocyte–macrophage colony-stimulating factor (GM-CSF) signalling in astrocytes drives the expression of MAFG and MAT2α and pro-inflammatory transcriptional modules, contributing to CNS pathology in EAE and, potentially, multiple sclerosis. Our results identify candidate therapeutic targets in multiple sclerosis.