Understanding the factors that regulate geographical variation in species richness has been one of the fundamental questions in ecology for decades, but our knowledge of the cause of geographical variation in species richness remains poor. This is particularly true for herpetofaunas (including amphibians and reptiles). Here, using correlation and regression analyses, we examine the relationship of herpetofaunal species richness in 245 localities across China with 30 environmental factors, which include nearly all major environmental factors that are considered to explain broad-scale species richness gradients in such theories as ambient energy, water–energy dynamics, productivity, habitat heterogeneity, and climatic stability. We found that the species richness of amphibians and reptiles is moderately to strongly correlated with most of the environmental variables examined, and that the best fit models, which include explanatory variables of temperature, precipitation, net primary productivity, minimum elevation, and range in elevation, explain ca 70% the variance in species richness for both amphibians and reptiles after accounting for sample area. Although water and temperature are important explanatory variables to both amphibians and reptiles, water variables explain more variance in amphibian species richness than in reptile species richness whereas temperature variables explain more variance in reptile species richness than in amphibian species richness, which is consistent with different physiological requirements of the two groups of organisms.