Two phases of diabase-sill-forming magmatism are recorded within the Badu anticline where magmas were emplaced into upper Palaeozoic carbonates and clastic rocks of the Youjiang fold-and-thrust belt in the SW South China Block, China. Zircons from these diabase units yield weighted mean U–Pb ages of 249.2±2.0 Ma and 187.1±3.3 Ma, and magmatic oxygen fugacity values from ‒20 to ‒6 (average of ‒12, equating to FMQ +5) and ‒20 to ‒10 (average of ‒15, equating to FMQ +2), respectively. These data indicate that the sills were emplaced during Early Triassic and Early Jurassic times. The discovery of c. 250 Ma mafic magmatism in this area was probably related to post-flood-basalt extension associated with the Emeishan mantle plume or rollback of the subducting Palaeo-Tethys slab. The c. 190 Ma diabase sills indicate that the southwestern South China Block records Early Jurassic mafic magmatism and lithospheric extension that was likely associated with a transition from post-collisional to within-plate tectonic regimes. The emplacement of diabase intrusions at depth may have driven hydrothermal systems, enabling the mobilization of elements from sedimentary rocks and causing the formation of a giant epigenetic metallogenic domain. The results indicate that high-oxygen-fugacity materials within basement rocks caused crustal contamination of the magmas, contributing to the wide range of oxygen fugacity conditions recorded by the Au-bearing Badu diabase. In addition, data from inherited xenocrystic zircons within the Badu diabase and detrital zircons from basement rocks suggest that the Neoproterozoic Jiangshao suture extends to the south of the Badu anticline.