Soil nitrogen (N) is a renewable resource of N fixed by free-living N fixation (FLNF) diazotrophs. Thus, understanding the microbial driving mechanism of FLNF activity can aid in the optimization of N input. However, the role of co-symbiosis between diazotrophs and arbuscular mycorrhizal fungi (AMF) in the FLNF activity at different soil depths has been largely overlooked, particularly in karst ecosystems. Thus, we investigated soil properties and the characteristics of diazotroph and AMF across soil depths, from topsoil to soil-rock mixing layer, based on the soil profile. Soil properties such as soil organic matter and ammonium N decreased with increasing soil depth, whereas pH showed the opposite trend. Similarly, diazotroph abundance and diversity and AMF abundance were higher by 8–73% in 0–20 cm soil than in 20–40 cm and soil-rock mixing layer. Despite high diazotroph abundance in the topsoil, the FLNF activity was higher by 30% at soil-rock mixing layer than in 0–20 cm. The co-occurrence network analysis revealed a strengthening of the cooperative relationship between the diazotroph and AMF taxa at the soil-rock mixing layer via an increase in the number of unique AMF taxa. A structural equation model indicated that increasing soil depth improves the FLNF activity due to increasing soil pH and mutualistic cooperations between diazotrophs and AMF taxa, such as Bradyrhizobium to AMF unclassified taxa and Bradyrhizobium to Racocetra. This study provides novel insights into the interspecific interactions between diazotrophs and AMF, rather than their abundance and diversity, which were found to be the most important driving factors of FLNF activity at the soil-rock mixing layer. Consequently, the roles of biotic factors in influencing mutually beneficial microbial taxa regulating FLNF activity should be considered during vegetation recovery in the fragile karst region.