To clarify the effects of farmland abandonment and crop species on the nitrogen-cycling functional genes, we collected soil samples from surface and subsurface layers of Ultisol from abandonment land, peanut fields and sweet potato fields at Dongxiang Red Soil Comprehensive Experimental Station in Jiangxi Province. Real-time quantitative PCR was employed to determine the abundance of nitrogen-cycling functional genes. The results showed that: (1) Land abandonment significantly increased the contents of surface soil organic carbon (SOC), total nitrogen (TN) and dissolved organic carbon (DOC), but decreased available phosphorus (AP) and available potassium (AK). Sweet potato fields had higher AP content than peanut fields. (2) The abandonment significantly reduced the abundance of
amoA genes of ammonia-oxidizing bacteria (AOB) and comammox bacteria branch A (Clade A), but did not affect other nitrogen-cycling functional genes, including nitrogen fixation gene (
nifH), ammonia-oxidizing archaea
amoA gene (AOA
amoA), and denitrification genes (
nirS,
nirK,
nosZⅠ,
nosZⅡ). Specifically, the abundance of AOB and Clade A
amoA genes in peanut fields was 8.16×10
7 and 1.12×10
8 copies·g
-1, respectively, which was significantly higher than those of 3.75×10
7 and 6.17×10
7 copies·g
-1 in sweet potato fields. The abundances of other N-cycling functional genes (
nifH, AOA
amoA,
nirS,
nirK,
nosZⅠ, and
nosZⅡ) did not differ between peanut and sweet potato fields, indicating that the process of nitrification was more sensitive to farmland abandonment and crop species, while nitrogen fixation and denitrification functional groups exhibited weaker responses to these changes. (3) The abundances of all nitrogen-cycling functional genes in the surface soil were higher than those in subsurface soil. With the exception of TN, subsurface soils exhibited minimal responsiveness to land use changes, as evidenced by the non-significant variations in both physicochemical properties and abundances of N-cycling genes. In conclusion, farmland abandonment may exacerbate phosphorus and potassium limitation and suppress nitrification-related functional gene abundances, while enhancing soil organic carbon, with relatively limited effects on nitrogen fixation and denitrification communities. This suggests that when utilizing abandonment for soil fertility enhancement or ecological restoration, attention should be paid to potential phosphorus and potassium limitations. Moreover, the significant impact on soil nitrogen transformation processes, particularly nitrification, must be recognized. Future recultivation efforts should prioritize the supplementation of phosphorus and potassium fertilizers.