Nitrogen-cycling processes in the deep sea remain understudied. This study investigates the distribution of nitrogen-cycling microbial communities in the deep-sea surface sediments of the western South China Sea, using metagenomic sequencing and real-time fluorescent quantitative PCR techniques to analyze their composition and abundance, and the effects of 11 environmental parameters, including NH4+-N, NO3--N, NO2--N, PO43--P, total nitrogen (TN), total organic carbon (TOC), C/N ratio, pH, electrical conductivity (EC), SO42-, and Cl-. The phylum- and species-level microbial community compositions show that five sites can be grouped as a major cluster, with sites S1 and S9 forming a sub-cluster, and sites S13, S19, and S26 forming the other; whereas sites S3 and S5 constitute a separate cluster. This is also evident for nitrogen-cycling functional genes, where their abundance is influenced by distinct environmental conditions, including water depths (shallower at sites S1 and S9 against deeper at sites S13, S19, and S26) and unique geological features (sites S3 and S5), whereas the vertical distribution of nitrogen-cycling gene abundance generally shows a decreasing trend against sediment depth. Redundancy analysis (RDA) exploring the correlation between the 11 environmental parameters and microbial communities revealed that the NO2--N, C/N ratio, and TN significantly affect microbial community composition (p < 0.05). This study assesses the survival strategies of microorganisms within deep-sea surface sediments and their role in the marine nitrogen cycle.