Histidine dipeptides (HDs) are synthesized in brain oligodendrocytes by carnosine synthase (carns1), but their role is unknown. Using metabolomics and in vivo experiments with both constitutive and oligodendrocyte-selective carns1-KO mouse models, we found that HDs are critical for oligodendrocyte survival and protect against oxidative stress. Carns1-KO mouse models had lower numbers of mature oligodendrocytes, increased lipid peroxidation, and behavioral changes. Cuprizone administration, which increases reactive oxygen species in vivo, resulted in higher oligodendrocyte death, demyelination, axonal alterations, and oxidative damage in the corpus callosum of carns1-KO mice. Gliosis and oxidative damage by cuprizone were prevented by pretreatment with the antioxidant N-acetylcysteine. NADPH levels were increased threefold in the brains of carns1-KO mice as an antioxidant response to oxidative stress through acceleration of the pentose phosphate pathway (PPP). This was due to overexpression of glucose-6-phosphate dehydrogenase, the rate-limiting enzyme of the PPP. Likewise, expression of NAD kinase, the biosynthetic enzyme for NADP+, and NAMPT, which replenishes the NAD+ pool, was higher in carns1-KO mice brains than in controls. Our observations suggest that HDs cell-autonomously protect oligodendrocytes from oxidative stress, with implications for demyelinating diseases.