Objective To investigate the effect of transcranial direct current stimulation (tDCS) on post-stroke executive dysfunction (PSEI) and its possible mechanism, and to evaluate the therapeutic effect of event-related potential P300 in patients with stroke. Methods A total of 60 patients with PSEI in the rehabilitation department of Xuzhou Central Hospital from November 2020 to May 2021 were randomly divided into stimulation group (n=30) and pseudo stimulation group (n=30). Each group received routine cognitive rehabilitation training. The stimulation group was given tDCS stimulation, 5 times a week, 20 min each time, for a total of 4 weeks. The pseudo stimulation group was given pseudo stimulation. Executive function was assessed using the Montreal Cognitive Assessment Scale (MoCA), Digit Span Task (DST), Stroop Colour Word Test (SCWT), and Frontal lobe function assessment scale (FAB). In the meanwhile, P300 was measured. Patients in both groups were evaluated at baseline and immediately after intervention. Results There were no significant differences in MoCA, FAB, SCWT and DST scores between the two groups before treatment (all P> 0.05). After 4 weeks' treatment, MoCA score (19.13±3.01), FAB score (11.80±1.77), SCWT score [word color time (53.09±14.40) s, word color error 2.00 (2.00,4.00), word meaning interference (25.60±13.34) s], DST score [forwords 8.00 (8.00,9.00), backwards 5.00 (4.00,5.00)], P300 latency period (333.90±22.96) ms, P300 amplitude (11.03±3.12) μV of the stimulation group were better than those of the pseudo stimulation group [MoCA score (16.83±3.25), FAB score (10.30±1.26), SCWT score: word color time (61.27±15.13)s, word color error 4.00(3.00,5.00), word meaning interference (33.78±11.26)s, DST score: forwards 7.00 (7.00,8.00), backwards 3.00 (3.00,4.00), P300 latency period (354.34±24.15) ms, P300 amplitude (7.98±2.66) μV]. After treatment, MoCA, FAB, SCWT, DST, P300 latency period and P300 amplitude difference in the stimulation group were better than those in the pseudo stimulation group [MoCA score (6.20±2.04) vs (3.73±1.66), FAB score (3.90±1.40) vs (2.27±1.17), SCWT score: word color time 11.13 (8.36,16.45) s vs 2.94 (2.16,5.22) s, word color error 3.00 (2.00,3.00) vs 1.00 (0,1.00), word meaning interference 8.65 (5.02, 15.57) s vs 3.21 (1.23,5.98) s, DST score: forwards 3.00 (2.00,3.00) vs 1.50 (1.00,2.00), backwards 2.00 (2.00,2.00) vs 1.00 (1.00,1.00), P300 latency period (47.62±10.26) ms vs (27.76±7.24) ms, P300 amplitude (5.15±2.06) μV vs (2.81±1.48) μV, all P< 0.05]. Conclusions tDCS can improve the executive function of PSEI patients, and the combination of routine rehabilitation training has a better effect on the rehabilitation of PSEI patients than single routine rehabilitation training. As an objective indicator, event-related potential P300 is helpful to evaluate the efficacy of tDCS in patients with PSEI.