The soil nitrogen (N) cycle, as a network of interlinked processes, is mainly driven by microbial communities. However, the patterns and factors that influence the abundance of the different N-cycling microbial communities in temperate and subtropical forest soils are still poorly understood. Moreover, recent studies have tended to focus on surface soils, and have neglected the fact that there may be steep gradients in nutrient concentrations in forest soil profiles. The objective of our study was to determine whether the distributions and compositions of N-cycling microbial communities changed with depth in subtropical and temperate forest soils. We collected soil samples from the surface to 80cm deep from 2 forests, a native conifer mixed broadleaf temperate forest in northeast China and a native evergreen broadleaf subtropical forest in south eastern China. We used high-throughput sequencing to fingerprint the soil microbial community structures and real-time quantitative PCR to measure the abundances of N-cycling functional genes (NFGs), specifically those involved in organic N decomposition (chiA), N fixation (nifH), archaeal and bacterial ammonia oxidation (amoA; AOA and AOB, respectively), and nitrite reduction (nirK and nirS). The composition and diversity of N-cycling microbes shifted between the upper and lower soils. Because of changes in soil nutrient concentrations and soil conditions with soil depth, N-cycling microbial taxa searched for different ecological niches. The absolute abundances of NFGs decreased with depth in both forest soils, indicating that N transformations mainly occurred in surface soil. The relative abundances of NFGs differed between the two forest soils. Because the soil C/N ratios declined with depth in the soil profile, N-cycling microbes invested less energy in N-supplying mineralization and fixation processes that were C-intensive and invested more energy in ammonia oxidization to balance the soil stoichiometry in the subtropical forest subsoils. The nifH, which dominated the soil profiles of the temperate forest were mainly controlled by the soil N concentrations, indicating the high microbial demand for N. We also found that the microbial N storage potentials were lower, and the NO3−-N leaching potentials were higher, in the N-rich subtropical forest surface soils and subsoils than in the temperate forest subsoils and surface soils, and that these potentials were significantly correlated with the soil N/P ratios. This suggests that N-cycling microbes change their energy investments at the molecular scale depending on the level of N saturation in the soil.