Understanding the dynamics and underlying mechanism of carbon exchange between terrestrial ecosystems and the atmosphere is one of the key issues in global change research. In this study, we quantified the carbon fluxes in different terrestrial ecosystems in China, and analyzed their spatial variation and environmental drivers based on the long-term observation data of ChinaFLUX sites and the published data from other flux sites in China. The results indicate that gross ecosystem productivity (GEP), ecosystem respiration (ER), and net ecosystem productivity (NEP) of terrestrial ecosystems in China showed a significantly latitudinal pattern, declining linearly with the increase of latitude. However, GEP, ER, and NEP did not present a clear longitudinal pattern. The carbon sink functional areas of terrestrial ecosystems in China were mainly located in the subtropical and temperate forests, coastal wetlands in eastern China, the temperate meadow steppe in the northeast China, and the alpine meadow in eastern edge of Qinghai-Tibetan Plateau. The forest ecosystems had stronger carbon sink than grassland ecosystems. The spatial patterns of GEP and ER in China were mainly determined by mean annual precipitation (MAP) and mean annual temperature (MAT), whereas the spatial variation in NEP was largely explained by MAT. The combined effects of MAT and MAP explained 79%, 62%, and 66% of the spatial variations in GEP, ER, and NEP, respectively. The GEP, ER, and NEP in different ecosystems in China exhibited ‘positive coupling correlation’ in their spatial patterns. Both ER and NEP were significantly correlated with GEP, with 68% of the per-unit GEP contributed to ER and 29% to NEP. MAT and MAP affected the spatial patterns of ER and NEP mainly by their direct effects on the spatial pattern of GEP.