AIM: To investigate the potential of resveratrol (Res) to alleviate cerebral ischemia-reperfusion injury (CIRI) by activating autophagy. METHODS: One hundred SD rats were purchased and subjected to middle cerebral artery occlusion/ reperfusion (MCAO/R) using the suture method. Rats with failed surgeries were excluded, and they were randomly divided into seven groups: Sham (S) group, Model (M) group, Resveratrol pretreatment (Res) group, 3-methyladenine (3-MA) group, Resveratrol + 3-methyladenine (Res + 3-MA) group, Z-YVAD group, and Res + Z-YVAD group, with 12 rats in each group. Neurological deficits and brain damage were assessed using Longa scoring, TTC staining, and measurement of infarct volume. Immunohistochemistry, immunofluorescence, and immunoblotting were employed to detect the expression of autophagy-related proteins Beclin-1, LC3-II, P62, and pyroptosis-related proteins NLRP3, caspase-1, GSDMD, IL-1β. RESULTS: Resveratrol pretreatment improved neurological deficits and reduced infarct volume in rats. It upregulated autophagy-related proteins Beclin-1, LC3-II, downregulated P62, and pyroptosis-related proteins NLRP3, caspase-1, GSDMD, IL-1β expression. The autophagy inhibitor 3-MA completely reversed the above effects of Res. After adding the pyroptosis inhibitor Z-YVAD, the changes in autophagy-related proteins Beclin-1, LC3-II, and P62 were not significant, while the expression of NLRP3, caspase-1, GSDMD, IL-1β significantly decreased. Neurological deficits worsened, and infarct volume increased in rats. CONCLUSION: Res attenuates cerebral ischemia-reperfusion injury by activating autophagy and inhibiting pyroptosis, possibly through the regulation of the P62.