Biotic diversity of ecological communities can be driven by a mixture of climatic, soil and biotic factors from local to regional scales. Patterns of diversity change were often examined along latitudinal or elevational gradients, which were mainly driven by climatic factors. However, few studies have assessed biodiversity patterns along both abiotic and biotic gradients simultaneously. Here, we established 309 forest dynamics plots of typical forest vegetation types (tropical rainforest, subtropical evergreen deciduous broad-leaf mixed forest, warm temperate conifer broad-leaf mixed forest, and temperate conifer forest) in seven biogeographic regions across four climatic regions (tropical, subtropical, warm temperate, and temperate regions) in China. A total of 46,280 tree individuals of 801 species in these plots were tagged, investigated and mapped, and six functional traits and seven soil factors were sampled and measured, in addition, data on three climatic factors were extracted from Worldclim. Principal component analysis (PCA) was used to build the compound habitat gradient (CHG) combining the biotic and abiotic factors. Patterns of changes in species and functional diversity along the CHG were analyzed. Results showed that species richness, Shannon-Wiener index and functional richness (FRic) increased but functional divergence (FDiv) decreased along the first axis of the CHG. The models using the first four PCA axes of the CHG and models with the individual variables had more power to explain species diversity than functional diversity. PC1 was the most important predictor in explaining patterns of diversity variation. The null models of FRic and FDiv were significantly negatively correlated with PC1 in the compound habitat gradient, and not with other axes. Our study demonstrates that the compound habitat gradient analysis is an effective approach of exploring patterns of biodiversity change and understanding both the abiotic and biotic factors driving community assembly across different climatic regions.