The present study investigated the inhibitory and neuroprotective effects of Rubia yunnanensis alcohol extract (RY-A) on oxidative stress induced by oxygen-glucose deprivation/reoxygenation (OGD/R) in HT22 cells. In vitro cultured HT22 cells were randomly divided into control, OGD/R, OGD/R + 100 µmol/l edaravone and OGD/R + 10, 20 and 40 µg/ml RY-A groups. Oxygen-sugar deprivation was performed with 10 mmol/l sodium dithionite combined with sugar-free DMEM medium for 2 h, followed by re-glycolization and reoxygenation for 2 h to establish an in vitro OGD/R model. Cell morphology was observed under a phase contrast microscope. Cell survival rate was detected by thiazolyl blue and lactate dehydrogenase and oxidative stress-related indexes were detected by commercial kits. The effects and metabolic alterations of RY-A treatment after OGD/R were evaluated using ultra-high performance liquid chromatography and mass spectrometry. Protein levels were further examined by western blotting. The results showed that cells in the OGD/R group were swollen and lacked protrusions, had significantly reduced viability and had significantly elevated oxidative stress-related indexes of reactive oxygen species, nitric oxide levels and malondialdehyde content and significantly reduced activities of the antioxidant enzymes superoxide dismutase and glutathione peroxidase, compared with controls. Compared with the OGD/R group, the RY-A group had significantly improved cell morphology and significantly increased cell viability and in terms of oxidative stress, exhibited significantly reduced reactive oxygen species, nitric oxide levels and malondialdehyde content, as well as significantly increased superoxide dismutase and glutathione peroxidase activities. Metabolomic analysis identified changes in 20 metabolites, including L-tryptophan, ornithine, eicosapentaenoic acid-d5, isosafrole and xanthine. Metabolomics analysis showed that the pathways affected included those related to phenylalanine, tyrosine and tryptophan biosynthesis, the prolactin signaling pathway and amphetamine addiction. These results suggested that RY-A had significant preventive effects on an in vitro model of cerebral ischemia-reperfusion injury simulated by OGD/R and the mechanism may be related to increased tryptophan content, activation of indoleamine 2,3-dioxygenase enzymes and inhibition of oxidative stress.