The East China Sea Shelf Basin (ECSSB) lies at the south-eastern margin of the Eurasian Plate and was affected by the subduction of the Pacific Plate and the Philippine Plate. It experienced and recorded multistage tectonic inversions in the Cenozoic, especially in the Xihu Sag. In an attempt to investigate the evolution and mechanism of tectonic inversion, this paper presents numerical simulation results by the finite element method to the Xihu Sag. Combined with comprehensive structural analyses of seismic profiles, this paper determines the structural geometry of the sag for establishing a viscoelastic geologic model including six-layer strata and nine major faults. Simulation results show that the boundary conditions of transtension and transpression control the inversion process that propagates from east to west, and the distribution of low compressive stress displays certain correlations with the distribution of oil deposits. Based on quantitative analysis of the vertical displacement field of the Xihu Sag, this paper identifies a tectonic inversion process, which indicates that the western part of the sag uplifts and the eastern part subsides during the first-stage inversion; whereas the western part subsides and central-eastern parts uplift during the second and third stages. The formation of the tectonic inversion is controlled by the adjustment of the stress field from dextral transtension to sinistral transpression caused by the change of subduction rates and direction of the Pacific Plate and the Philippine Sea Plate.