Background: Astrocyte A1/A2 phenotypes may play differential role in the pathogenesis of periventricular white matter (PWM) damage in septic postnatal rats. In this study, we sought to determine whether melatonin(MEL) would improve the axonal hypomyelination and neurological dysfunction, and, if so, to ascertain whether this may be related to transformation of astrocyte A1 to A2 phenotype.Methods: One-day-old Sprague–Dawley rats were divided into control, LPS, and LPS+MEL groups. Immunofluorescence was performed to detect IBA1, GFAP, MAG, C3 and S100A10 in the PWM of neonatal rats. C1q, IL-1α and TNF-α expression were assessed by immunofluorescence and ELISA. Electron microscopy was conducted to observe alterations of axonal myelin sheath in the PWM, and the number of PLP and MBP positive oligdendrocytes was caculated using in situ hybridization. The effects of MEL on locomotor ability, spatial learning and memory were evaluated by behavioral testing. In vitro, A1 astrocyte was induced by IL-1α, C1q and TNF-α, the effect of MEL on C3 and S100A10 expression was determined by Western blot and immunofluorescence. JAK2/STAT3 signaling pathway was investigated to determine whether it was involved in modulation of A1/A2 phenotype transformation.Results: At 1 and 3 days after LPS injection, IBA1+ microglia in the PWM were significantly increased in cell numbers which generated excess amounts of IL-1α, TNF-α, and C1q. The number of A1 astrocytes was significantly increased at 7-28d after LPS injection. In rats given MEL treatment, the number of A1 astrocytes was significantly decreaed, but that of A2 astrocytes, PLP+, MBP+ and MAG+ cells was increased. By electron microscopy, ultrastructural features of axonal hypomyelination were attenuated by MEL. Furthermore, MEL improved neurological dysfunction as evaluated by different neurological tests. In vitro, MEL decreased the C3 significantly, and upregulated expression of S100A10 in primary astrocytes subjected to IL-1α, TNF-α and C1q treatment. Additionally, JAK2/STAT3 signaling pathway was found to be involved in modulation of A1/A2 phenotype transformation. Conclusions: MEL effectively alleviates PWMD of septic neonatal rats, and that it is most likely through modulating astrocyte phenotypic transformation from A1 to A2 via the MT1/JAK2/STAT3 pathway.