Yongle Atoll is a complex atoll composed of 13 separated small atolls/reefs in the Xisha Islands, northern-central South China Sea. Wide, deep channels connect the Yongle Atoll lagoon with the open ocean. The sea surface partial pressure of CO2 (pCO2) and sea–air CO2 flux was measured at different geomorphological locations on the atoll. Atmospheric pCO2 generally showed small diurnal variations, while seawater pCO2 showed large diurnal variations. Lingyang Reef lagoon, an atoll within Yongle Atoll, was used to check the spatial difference in seawater pCO2 and air–sea CO2 flux. The diurnal variation in seawater pCO2 was greater in the lagoon (258–748 μatm) than outside the lagoon area (354–476 μatm). Differences were also observed in the air–sea CO2 fluxes depending on geomorphological zone. The mean seawater pCO2 at Yongle Atoll is in the order of Lingyang Reef lagoon > inner reef slope of the Yongle Atoll > Yongle Atoll channel slope ≈ outer reef slope of the Yongle Atoll. The degree mixing between the lagoon and open sea through channels may have a key role in the horizontal distribution of seawater pCO2 in the Yongle Atoll. Additional analyses indicated that the daily variations in surface seawater pCO2 are significantly influenced by biological metabolic processes. The mean air–sea CO2 flux in the Yongle Atoll was ~ 3.2 mmol CO2 m−2 d−1, indicating that the Yongle Atoll acts as a net source of CO2 to the atmosphere.