Microfacies and sedimentological analyses of the Upper Permian coal-bearing Heshan Formation in the Heshan coalfield of central Guangxi suggest that these coal measures formed in a marine carbonate platform setting. Low-volatile bituminous coals with very high organic sulphur overlie either palaeosols or locally developed cherts. The petrography and geochemistry of the coals suggest formation in low-lying mires, in which marine influence increased upwards. In the Heshan and overlying Dalong Formations, four third-order sequences are described based on the recognition of four sequence boundaries. Higher-order sequences within each of these third-order sequences are also documented and, within Sequence III, coal seams are developed above higher-order transgressive surfaces, representing the deposits formed during the lag time between initial flooding of the platform and the onset of carbonate production. In the Heshan Formation, the coals with greatest thickness occur immediately above third-order transgressive surfaces. It is argued that, in some coal-bearing siliciclastic-free marine carbonate-platform settings, accommodation creation rates and peat accumulation rates are balanced, hence greater coal accumulation can be achieved at the transgressive surface rather than at the maximum flooding surface.