Myelination facilitates rapid axonal conduction, enabling efficient communication across different parts of the nervous system. Here we examined mechanisms controlling myelination after injury and during axon regeneration in the central nervous system (CNS). Previously, we discovered multiple molecular pathways and strategies that could promote robust axon regrowth after optic nerve injury. However, regenerated axons remain unmyelinated, and the underlying mechanisms are elusive. In this study, we found that, in injured optic nerves, oligodendrocyte precursor cells (OPCs) undergo transient proliferation but fail to differentiate into mature myelination-competent oligodendrocytes, reminiscent of what is observed in human progressive multiple sclerosis. Mechanistically, we showed that OPC-intrinsic GPR17 signaling and sustained activation of microglia inhibit different stages of OPC differentiation. Importantly, co-manipulation of GPR17 and microglia led to extensive myelination of regenerated axons. The regulatory mechanisms of stage-dependent OPC differentiation uncovered here suggest a translatable strategy for efficient de novo myelination after CNS injury.