Nitrogen (N) availability is a critical determinant of ecosystem productivity in karst forests, yet the spatial patterns of soil N pools and their underlying microbial mechanisms at the rock-soil interface remain poorly understood across different lithologies. This study aims to elucidate how limestone and dolostone lithologies, coupled with the rock-soil interface effect, regulate N cycling processes. We investigated soil N fractions and N-cycling functional gene abundances in both bulk and rock-soil interface soils within secondary forests overlying dolostone and limestone in a typical karst region. Four treatments were compared: limestone bulk soil (LB), limestone interface soil (LI), dolostone bulk soil (DB), and dolostone interface soil (DI). Two-way ANOVA revealed that the rock-soil interface significantly enriched all measured N parameters (p < 0.05–0.001), with a more pronounced effect in limestone soils where NH4+, NO3−, TDN, and DON were significantly elevated. Conversely, lithology exerted a profound impact on NO3− and SMN, which were generally higher in dolostone than in limestone sites. Interestingly, while N pools were higher in certain dolostone fractions, the abundances of most N-cycling functional genes (e.g., nifH, ureC, narG, and nirS) were markedly higher in limestone soils, except for AOA amoA, which peaked in dolostone soils (p < 0.001). Random forest and Mantel’s tests identified that soil reactive minerals ((Ca+Mg)e) and enzymatic stoichiometry (BG/(LAP+NAG)) were the primary determinants of soil N pools, whereas N functional gene abundances were more sensitive to amorphous minerals ((Fe+Al)o), microbial biomass carbon (MBC), and viral diversity (Virusesα). Our results demonstrate that the rock-soil interface acts as a biogeochemical hotspot for N accumulation and microbial activity, though the magnitude of this effect is modulated by lithology. These findings suggest that reactive minerals and enzymatic stoichiometry are key mediators of N cycling, providing new insights into the geochemical controls of soil fertility in fragile karst carbonate landscapes.