The class IIa histone-deacetylases (HDACs) have pivotal roles in the development of different tissues. Of this family, Schwann cells express HDAC4, 5 and 7 but not HDCA9. Here we show that a transcription factor regulated genetic compensatory mechanism within this family of proteins, blocks negative regulators of myelination ensuring peripheral nerve developmental myelination and remyelination after injury. Thus, when HDAC4 and 5 are knocked-out from Schwann cells, a c-Jun dependent mechanism induces the compensatory overexpression of HDAC7 permitting, although with a delay, the formation of a myelin sheath. When HDAC4,5 and 7 are simultaneously removed, the Myocyte- specific enhancer-factor d (Mef2d) binds to the promoter and induces the de novo expression of HDAC9, and although several melanocytic- lineage genes are mis- expressed and Remak bundle structure is disrupted, myelination proceeds after a long delay. Thus, our data unveil a finely tuned compensatory mechanism within the class IIa HDAC family, coordinated by distinct transcription factors, that guarantees the ability of Schwann cells to myelinate during development and remyelinate after nerve injury.