Identifying whether and when the southern continental margin of the South China Sea (SCS) was part of the South China Block (SCB) is important for Mesozoic–Cenozoic paleogeographic reconstructions of Southeast Asia. In this paper, we present geochronological and geochemical data for dacites from Well NK-1 in the Nansha Block (Dangerous Grounds) of the southern SCS margin to investigate their petrogenesis and tectonic affinity. Zircon UPb and 40Ar/39Ar datings show that these dacites formed during the Late Triassic (218–217 Ma). The dacites have high total alkali (K2O + Na2O = 7.39–8.42 wt%) and relatively low CaO contents (1.87–3.38 wt%), and show geochemical affinities with A-type granites, with high Zr saturation temperatures (806–855 °C), FeOTot/MgO ratios (5.22–7.48), Zr + Nb + Ce + Y contents (530–680 ppm) and 10,000 × Ga/Al values (2.40–2.94), and relatively low A/CNK values (0.86–1.04). The primitive magma for the dacites was likely generated by partial melting of ancient crustal materials. Late Triassic dacites in the Nansha Block and Triassic A-type granites in the SCB formed in an extensional setting at the continental margin of the SCB. This setting was probably related to the Paleo-Pacific plate subduction that restarted prior to the Early Triassic. Therefore, the southern SCS margin was part of the SCB continental margin during the early Mesozoic, which provides more detailed insights into the paleogeography of SE Asia since the Mesozoic.