Objective To investigate the effect of Homer 1a on cerebral ischemia-reperfusion injury in mice. Methods Homer 1a knockout mice were used as the research objects to construct the model of cerebral ischemia-reperfusion in mice. The degree of cerebral ischemia-reperfusion injury in mice was evaluated based on the behavioral score. TTC staining was used to observe and calculate the volume of cerebral infarction. Apoptosis of the brain tissues of the mice was detected by Tunel. The proliferation of astrocytes was detected by GFAP method. The levels of IL-1β, TNF-α and IL-6 in the mouse brain were detected by Western blot. Results The behavioral score of the experimental group was significantly higher than that of the cerebral ischemia group, indicating that cerebral ischemia-reperfusion injury of the Homer 1a gene knockout mice were more severe than that of the cerebral ischemia group. The cerebral infarction volume in the experimental group was significantly larger than that in the cerebral ischemia group (P < 0.05). The apoptosis rate of brain cells in the experimental group was significantly higher than that in the cerebral ischemia group (P < 0.05). The number of brain astrocytes in the experimental group and the cerebral ischemia group was larger than that in the normal group (P < 0.05), while the number of brain astrocytes in the experimental group was smaller than that in the cerebral ischemia group. The expression levels of IL-6,TNF-α and IL-1β in the brain tissue of the experimental group were higher than those in the cerebral ischemia group (P < 0.05). Conclusions Homer 1a knockout can aggravate the injury after cerebral ischemia and reperfusion in mice. Homer 1a can attenuate cerebral ischemia-reperfusion injury.