Objective To investigate the effect of modified Tianma Gouteng Decoction in treating cognitive impairment in cerebral stroke patients during the recovery phase. Methods A total of 106 patients with cognitive impairment during the recovery phase of ischemic cerebral stroke were selected as the research subjects, and they were randomly divided into observation group or control group, with 53 cases in each group. The control group was treated with neurotrophic drugs combined with cognitive function training, based on which the observation group additionally received modified Tianma Gouteng Decoction. The two groups were compared before and after treatment in terms of Traditional Chinese Medicine syndrome scores, National Institutes of Health Stroke Scale (NIHSS) score, Montreal Cognitive Assessment (MoCA) scale score, cerebrovascular hemodynamic parameters with respect to mean velocity (Vm), peak systolic velocity (Vs), and resistance index (RI) of bilateral cerebral arteries, serological indicator levels in terms of serum vascular endothelial growth factor (VEGF), angiopoietin 1 (Ang⁃1), macrophage migration inhibitory factor (MIF), interleukin 6 (IL⁃6), clinical efficacy after treatment, and the occurrence status of adverse reactions during treatment. Results After treatment, both groups exhibited reductions in primary symptom, secondary symptom, and tongue⁃pulse scores of Traditional Chinese Medicine, NIHSS scores, cerebrovascular RI, and serum levels of MIF and IL⁃6 compared to before treatment, with the observation group demonstrating lower levels than the control group (P<0.05). Both groups depicted increases in MoCA scale scores, serum VEGF and Ang⁃1 levels, and bilateral cerebral arteries Vm and Vs compared to before treatment, with the observation group exhibiting higher levels than the control group (P<0.05). The treatment effectiveness rate was higher in the observation group than in the control group (P<0.05). There was no statistically significant difference in the incidence rate of adverse reactions during treatment between the two groups (P>0.05). Conclusion Modified Tianma Gouteng Decoction demonstrates good efficacy in treating cognitive impairment in cerebral stroke patients during the recovery phase. It helps inhibit vascular inflammatory responses, promote vascular repair, improve cerebral hemodynamics and cognitive function, and shows favorable safety.