Nervous system function depends on proper myelination for insulation and critical trophic support for axons. Myelination is tightly regulated spatially and temporally, but how it is controlled molecularly remains largely unknown. Here, we identified key molecular mechanisms governing the regional and temporal specificity of CNS myelination. We show that transcription factor EB (TFEB) is highly expressed by differentiating oligodendrocytes and that its loss causes precocious and ectopic myelination in many parts of the murine brain. TFEB functions cell-autonomously through PUMA induction and Bax-Bak activation to promote programmed cell death of a subset of premyelinating oligodendrocytes, allowing selective elimination of oligodendrocytes in normally unmyelinated brain regions. This pathway is conserved across diverse brain areas and is critical for myelination timing. Our findings define an oligodendrocyte-intrinsic mechanism underlying the spatiotemporal specificity of CNS myelination, shedding light on how myelinating glia sculpt the nervous system during development.