Cerebral ischemia-reperfusion injury (CIRI) is one of the most difficult challenges in cerebrovascular disease research. It is primarily caused by excessive autophagy induced by oxidative stress. Previously, a novel compound X5 was found, and the excellent antioxidant activity of it was verified in this study. Moreover, network pharmacological analysis suggested that compound X5 was closely associated with autophagy and the mTOR pathway. In vitro, X5 could significantly inhibit the expression of autophagy proteins Beclin-1 and LC3-β, which are induced by H2O2, and promote the expression of SIRT1. In vivo, compound X5 significantly reduced the infarct size and improved the neurological function scores in the middle cerebral artery occlusion (MCAO) model of rats. In conclusion, ROS-induced autophagy is closely related to mTOR, SIRT1 and others, and X5 holds promise as a candidate for the treatment of CIRI.