C-X-C motif chemokine 12 (CXCL12) is a chemokine that performs many functions. Studies have shown that CXCL12 can aggravate inflammatory symptoms in the central nervous system (CNS). Evidence also indicates that CXCL12 can promote the repair of myelin sheaths in the CNS in experimental autoimmune encephalomyelitis (EAE). Here, we investigated the function of CXCL12 in CNS inflammation by upregulating CXCL12 in the spinal cord and subsequently inducing EAE. CXCL12 upregulation in the spinal cords of Lewis rats was induced by the injection of adeno-associated virus 9 (AAV9)/eGFP-P2A-CXCL12 after intrathecal catheter implantation. Twenty-one days after AAV injection, EAE was induced and clinical score was collected; Immunofluorescence staining, WB and LFB-PAS staining were used to evaluate the effect of CXCL12 upregulation. In the in vitro study, oligodendrocyte precursor cells (OPCs) were harvested, cultured with CXCL12 and AMD3100, and subjected to immunofluorescence staining for functional assessment. CXCL12 was upregulated in the lumbar enlargement of the spinal cord by AAV injection. In each stage of EAE, upregulation of CXCL12 significantly alleviated clinical scores by inhibiting leukocyte infiltration and promoting remyelination. In contrast, the addition of AMD3100, which is a CXCR4 antagonist, inhibited the effect of CXCL12. In vitro, 10 ng/ml CXCL12 promoted the differentiation of OPCs into oligodendrocytes. AAV-mediated upregulation of CXCL12 in the CNS can alleviate the clinical signs and symptoms of EAE and significantly decrease the infiltration of leukocytes in the peak stage of EAE. CXCL12 can promote the maturation and differentiation of OPCs into oligodendrocytes in vitro. These data indicate that CXCL12 effectively promotes remyelination in the spinal cord and decreases the signs and symptoms of EAE.