The aim of the present study was to investigate the protective function and underlying mechanism of calcitonin gene-related peptide (CGRP) on cerebral ischemia/reperfusion damage in rats. Adult male Wistar rats were selected for the establishment of an ischemia/reperfusion injury model through the application of a middle cerebral artery occlusion. Animals were randomly divided into 6 groups of 24 animals. Drugs were administered according to the design of each group; animals were administered CGRP, CGRP8–37, PD98059 and SB20358. The neurobehavioral scores of the rat cerebral ischemia model in each group were calculated. The infarction range of the rat brain tissues was observed by 2,3,5-triphenyltetrazolium chloride staining. The expression levels of three proteins, phosphorylated c-Jun N-terminal kinase (JNK)/JNK, phosphorylated extracellular signal-regulated protein kinase (ERK)/ERK and p-p38/p38, in the mitogen-activated protein kinase (MAPK) pathway in the brain tissues was detected by western blotting. The results showed that CGRP could improve the neurobehavioral function of the ischemic rats and reduce the infarction range. Western blotting results confirmed that the function of the CGRP was mediated mainly through the reduction of the JNK and p38 phosphorylation and the promotion of ERK phosphorylation. Therefore, the present study confirmed that an increase in the exogenous CRGP could effectively improve ischemia/reperfusion injury of the brain tissue. The mechanisms of action were achieved through a reduction in JNK and p38 phosphorylation and an increase in ERL phosphorylation in the MAPK pathway. These mechanisms were interdependent.