In the 2030s, space-based gravitational-wave (GW) detectors will exhibit unprecedented sensitivity in the millihertz frequency band, greatly expanding the potential for testing theories of gravity compared toground-based GW detectors.Inspiredbyeffectivestringtheory,Einstein-dilaton Gauss–Bonnet (EdGB) gravity introduces an extra dilaton scalar field that is directly coupled to higher curvature terms. Here, we investigate the capability of Taiji to constrain the parameters of EdGB gravity by analyzing GWs from mas sive black hole binaries (MBHBs). We utilize the parameter ized post-Einsteinian (ppE) waveform with the leading order EdGBcorrectionsfortheinspiralphaseofMBHBs.Thecon straints on the coupling constants are obtained byperforming Fisher matrix analysis. With different mass ratios and spins χi at redshifts z = 2,3,4,5, the 1σ bounds ontheparameter α have the same order of magnitude: √ α ∼107 m.