During the late Palaeozoic Era, a series of related marine strata dominated by multi-layer limestones were deposited in the southern North China Craton. In order to gain new insights into the systematic geochemistry of the carbonate succession of the representative formation (Taiyuan Formation), we examined 59 limestone samples collected from the Huaibei Coal Basin (HCB), with a view towards quantitatively determining the major and trace elements and stable isotope compositions. The data obtained can provide essential evidence for reconstruction of the depositional palaeo-environment and tectonic setting of the Taiyuan Formation. Both X-ray diffraction analyses and palaeoredox proxies (e.g. V/Cr, V/(V + Ni) and authigenic U) indicated that the limestone layers were deposited in an oxic–dysoxic zone, with calcite as the main component. Moreover, palaeomagnetic evidence provided support for the conclusion that these limestones were laid down within an epicontinental sea depositional environment under a warm or hot palaeoclimate during the transition between late Carboniferous and early Permian time. Additionally, evidence obtained from our analyses of trace and rare earth elements revealed that the tectonic setting of the Taiyuan Formation (L1–L5) in the HCB transited from an open ocean to a passive continental margin, thereby indicating that this transformation stemmed from the subduction closure of the northeastern Palaeotethys Ocean. The findings of this study would be of interest to those working on the upper Palaeozoic marine strata in the southern North China Craton.