The aim of the present study was to investigate the effect of the caspase-3 inhibitor z-DEVD-fmk on the apoptosis of the brain tissues of rats with acute cerebral infarction. Middle cerebral artery occlusion was used to establish a rat model of infarction, and the rats were randomly divided into a sham group (n=15), model group (n=15) and treatment group (n=15). z-DEVD-fmk (2.5 µg/kg) was injected into the intracranial artery of rats in the treatment group, while the same volume of phosphate-buffered saline solution was administered to the rats of the sham and model groups. After 48 h, all rats were sacrificed and their brain tissues were removed. The caspase-3 mRNA level, protein level and activity, brain cell apoptosis index and infarction scope of the three groups were analyzed. Neurological impairment was also assessed. At 48 h after model establishment, the caspase-3 mRNA and protein levels in the brain tissues of the model group were significantly higher than those of the sham group, and those in the treatment group were significantly lower than those in the model group (P<0.05); however, they remained significantly higher than those in the sham group. Caspase-3 activity in the model group was significantly higher than that in the sham group, and treatment with the caspase-3 inhibitor significantly reduced caspase-3 activity compared with that in the model group (P<0.05). The apoptosis index and infarction scope in the model and treatment groups were significantly increased compared with those in the sham group, and were significantly lower in the treatment group than in the model group (P<0.05). The neurological impairment of rats in the model and treatment groups was increased significantly compared with that in the sham group, and the treatment group exhibited a significantly lower level of neurological impairment than the model group (P<0.05). In conclusion, the caspase-3 inhibitor z-DEVD-fmk effectively inhibited apoptosis and delayed the necrosis of brain tissue cells in rats with acute cerebral infarction, and had certain protective effects on brain tissue.