Objective This study is aimed at exploring the possible neuroprotective mechanism of aspirin and the effect of bacterial endotoxin lipopolysaccharide (LPS) during cerebral ischaemia-reperfusion (CIRP) injury. Methods We established three animal models: the CIRP, LPS, and CIRP+LPS models. Mortality, the injured brain area, and the beam walking test were used to estimate the degree of cerebral injury among the rats. Immunohistochemistry and immunofluorescence were used to detect activated microglia, matrix metalloproteinase-3 (MMP-3), and osteopontin (OPN). Results The injured brain area and mortality were dramatically reduced (p < 0.01), and the beam walking test scores were elevated (p < 0.01) in the acetylsalicylic acid (ASA) group compared to the control group. The number of microglia-, MMP-3-, and OPN-positive cells also increased. Furthermore, the number of GSI-B4, OPN, and MMP-3 cells decreased in the ASA group compared to the control group. After LPS stimulation, the number of microglia reached a peak at 24 h; at 7 d, these cells disappeared. In the ASA group, the number of microglia was significantly smaller (p < 0.05), especially at 24 h (p < 0.01), compared to the LPS group. Moreover, the injured brain area and the mortality were dramatically increased and the beam walking test scores were reduced (p < 0.01) after LPS simulation following CIRP. The degree of injury in the ASA group resembled that in the control group. However, the number of MMP-3-immunoreactive neurons or microglia was significantly larger than that of the control group (p < 0.05). In the ASA group, the MMP-3 expression was also considerably decreased (p < 0.05). Conclusions After CIRP, microglia were rapidly activated and the expression of MMP-3 and OPN significantly increased. For rats injected with LPS at reperfusion, the injured brain area and mortality also dramatically increased and the neurologic impairment worsened. However, ASA exhibited a neuroprotective effect during CIRP injury. Furthermore, ASA can reverse LPS-induced cerebral injury and inhibit the inflammatory reaction after CIRP injury.