We present new sedimentary data integrated into a regional Mesozoic stratigraphic framework to provide a detailed picture of spatio-temporal variations in deposition and depocenter migration of the northwest Sichuan basin. The Mesozoic sedimentary evolution is utilized to interpret basin subsidence history and to unravel coeval basin-margin tectonics. The northwest Sichuan basin, together with the Songpan-Ganzi terrane, behaved as a passive margin south of the Qinling Paleo-Tethys from late Paleozoic to early Middle Triassic times and then evolved into a peripheral foreland basin in response to collision of the North and South China blocks since the late Middle Triassic. Coeval with strong north-south contraction of the Songpan-Ganzi terrane in the Late Triassic, sinistral transpressional deformation of the Longmen Shan belt led to flexural subsidence of the adjacent western Sichuan basin. Renewed basin-margin fold-thrust activity triggered recurrence of flexural subsidence of the northwest Sichuan basin since the Middle Jurassic, with the depocenter eventually shifting to the northwestern corner of the basin in the Early Cretaceous. Sedimentary evolution of the northwest Sichuan basin and the basin-margin deformation imply that the South China block had been rotating clockwise relative to the North China block throughout the Mesozoic with an interim period of Early Jurassic tectonic quiescence. A model is advanced that invokes clockwise rotation of the South China block as a driver for tectonic evolution of both the basin and adjoining structural belts and provides an explanation for several salient features that are otherwise puzzling.