Stroke is a brain system disease with a high fatality rate and disability rate. About 80% of strokes are ischemic strokes. Cerebral ischemia-reperfusion injury (CIRI) caused by ischemic stroke seriously affects the prognosis of stroke patients. The purpose of this study is to investigate the effect of sufentanil (SUF) on CIRI model rats. We used middle cerebral artery occlusion (MCAO) to make the CIRI model in rats and monitored region cerebral blood flow (rCBF) to ensure that blood flow was blocked and recanalized. We used ELISA and RT-PCR to detect the expression of inflammatory factors in rat serum and brain tissue. In addition, we detected the expression of metalloproteinase (MMP) 2, MMP9 and collagen IV in brain tissues and performed Evans blue (EB) assay to determine the permeability of the blood-brain barrier (BBB). Finally, we clarified the apoptosis of brain tissue through the TUNEL staining and the detection of caspase3, Bcl2 and Bax. Various concentrations of SUF, especially 5, 10 and 25 μg/kg of SUF, all alleviated the infarct size, neurological function and brain edema of MCAO rats. SUF pretreatment also effectively reduced the expression of inflammatory cytokines in MCAO rats, including interleukin (IL)-1β, IL-4, IL-6, IL-8, IL-10 and tumor necrosis factor (TNF)-α. In addition, SUF also inhibited MMP2 and MMP9 and promoted the expression of collagen IV, indicating that SUF attenuated the destruction of the BBB. SUF also inhibited caspase3 and Bax rats and promoted Bcl2 in MCAO rats, thus inhibiting cell apoptosis. SUF pretreatment effectively improved the neurological function and cerebral infarction of MCAO rats, inhibited excessive inflammation in rats, protected the BBB, and inhibited cell apoptosis in brain tissue.