Astrocytes, a major glial cell type in the brain, play a critical role in supporting the progression of medulloblastoma (MB), the most common malignant pediatric brain tumor. Through lineage tracing analyses and single-cell RNA sequencing, we demonstrate that astrocytes are predominantly derived from the transdifferentiation of tumor cells in relapsed MB (but not in primary MB), although MB cells are generally believed to be neuronal-lineage committed. Such transdifferentiation of MB cells relies on Sox9, a transcription factor critical for gliogenesis. Our studies further reveal that bone morphogenetic proteins (BMPs) stimulate the transdifferentiation of MB cells by inducing the phosphorylation of Sox9. Pharmacological inhibition of BMP signaling represses MB cell transdifferentiation into astrocytes and suppresses tumor relapse. Our studies establish the distinct cellular sources of astrocytes in primary and relapsed MB and provide an avenue to prevent and treat MB relapse by targeting tumor cell transdifferentiation.