Stroke is the second most frequent cause of mortality, resulting in a huge societal burden worldwide. Timely reperfusion is the most effective therapy; however, it is difficult to prevent ischemia/reperfusion (I/R) injury. In traditional Chinese medicine, hydroxysafflor yellow A (HSYA) has been widely used for the treatment of cerebrovascular disease and as a protective therapy against I/R injury. Evidence has demonstrated that HSYA could reduce the levels of reactive oxygen species and suppress cellular apoptosis; however, whether HSYA alters the metabolic profile as its underlying mechanism for neuroprotection remains unknown. In the present study, using a metabolomic screening, phenylalanine was identified to significantly increase in an experimental model of mouse cerebral I/R injury. Notably, western blotting and qPCR analysis were conducted to test the expression level of apoptosis‑associated factors, and HSYA was identified to be able to protect neuronal cells by reducing phenylalanine level associated with I/R injury. Additionally, these findings were confirmed in primary mouse neurons and PC12 cells exposed to oxygen and glucose deprivation/reoxygenation (OGD/R) stress. Of note, HSYA was observed to regulate the mRNA expression of key metabolic enzymes, phenylalanine hydroxylase, tyrosine aminotransferase and aspartate aminotransferase, which are responsible for phenylalanine metabolism. Furthermore, by performing mitochondrial labeling and JC‑1 fluorescence assay, HSYA was identified to promote mitochondrial function and biogenesis suppressed by OGD/R. The findings of the present study demonstrated that I/R injury could increase the levels of phenylalanine, and HSYA may inhibit phenylalanine synthesis to enhance mitochondrial function and biogenesis for neuroprotection. The present study proposed a novel metabolite biomarker for cerebral I/R injury and the evaluated the efficacy of HSYA as a potential therapeutic treatment I/R injury.