Previous studies on the diversity and composition of nifH genes in the South China Sea (SCS) were mainly based on quantitative PCR and DNA clone methods. The pyrosequencing results of partial nifH gene fragments were used to study the spatiotemporal heterogeneity in composition and diversity of diazotrophs in the SCS. Seawater samples were collected throughout the upper ocean (<200-m depth) in different sites, as follows: the Pearl River Estuary; Taiwan and Luzon Straits (which are affected by the Kuroshio Current); a Trichodesmium bloom site; and two open ocean sites. Sample collection was conducted in four surveys from 2007 to 2010. A large dataset containing 217599 nifH reads from 27 samples was obtained. Putative diazotrophs in the SCS have reasonably low diversities, and the -proteobacteria and Trichodesmium were the two dominant nifH phylogenetic groups. No significant difference was observed among different regions and years. However, a significant difference existed among the samples obtained from different water depths. The results provide a broad and general view of the diversity and composition of the putative diazotrophs in the SCS.