Cerebral infarction (CI) is characterised by high morbidity, mortality, and disability rates. Recently, Chinese medicine has been widely used and has gained satisfactory results in the treatment of CI. Our previous study showed that gastrodin could facilitate the recovery of neurological function in middle cerebral artery occlusion (MCAO) rats. This study explores this mechanism. SD rats were separated into control, sham, model, and gastrodin groups. After MCAO surgery, the gastrodin group was administered gastrodin (100 mg/kg), and after 1/3/7 days, the ischaemic hemisphere and serum was collected, and then we extracted the circulating exosomes from the serum. We then tested the levels of XIAP (x-linked inhibitor of apoptosis protein), IAP binding proteins (SMAC, HtrA2, ARTs), and miR-20a-5p (a gastrodin potential effect target) in the brain tissues, circulating exosomes, and serum using various methods. Our results showed that circulating exosomes can penetrate the blood-brain barrier (BBB) and that gastrodin can upregulate the amount of miR-20a-5p in circulating exosomes. The circulating exosomes penetrate the BBB and upregulate the expression of XIAP in the ischaemic hemisphere. Gastrodin can also decrease the amount of IAP binding proteins (SMAC, HtrA2, ARTs). Gastrodin can increase the amount of miR-20a-5p in circulating exosomes, which penetrates the BBB and upregulates XIAP expression in the ischaemic hemisphere. By inhibiting apoptosis of neurones, it can facilitate the recovery of neurological function in MCAO rats.