Geodetic observations and seismic inversions suggest that the 2021 Mw7.4 Maduo earthquake's rupture velocity differs in two directions. However, the dynamic mechanisms underlying these differences remain unclear. To address this issue, we constructed a three-dimensional finite element model implementing heterogeneous fault geometry and real topography and simulated the Maduo earthquake's dynamic rupture process, with the tectonic stress field varying with depth. The results show that the uneven distribution of normal and shear stresses on the fault plane, due to the complex geometry of the seismogenic fault, is the primary factor controlling rupture velocity and slips on the fault plane of the Maduo earthquake. The modelled results reproduced basic kinematic characteristics as indicated by the observation and inversion results of the Maduo earthquake. Our study also suggests that if an earthquake occurs in a region without significant changes in velocity structure and stress field distribution, the complex geometry of the seismogenic fault is responsible for the dynamic rupture process. These findings provide important insights into the rupture behaviour of geometrically complex faults and have important implications for seismic hazard assessments of these complicated fault systems.