Aims: Nitrogen (N) and phosphorus (P) have important roles in the terrestrial carbon (C) cycle. Nevertheless, the responses of microbial ecological functions involving C cycling in saline-sodic soils to N and P are barely known, particularly at the functional gene level. Methods: The influence of N and P addition on C functional genes in saline-sodic soils was explored using a pot experiment. Eight treatments were conducted, namely: a control (CK), three N addition levels (NL, NM, and NH), three P addition levels (PL, PM, and PH), and combined N and P addition (NP). Results: Results revealed that the total abundance of C functional genes was enhanced by the addition of N and P, promoting C fixation, degradation, and CH4 metabolism. The total gene abundance was the highest in NL among the three N addition treatments; however, the highest abundance was observed in PH among the three P addition treatments. Compared to CK, all treatments exerted greater effects on the abundance of genes related to recalcitrant C decomposition than on labile C decomposition. This was because increment in relative abundance of oligotrophic taxa was greater than that of copiotrophic taxa after the addition of N and P. Partial least squares path modeling analysis revealed that N and P addition regulated gene abundance by altering DOC, microbial diversity, and ESP, thereby directly influencing C mineralization. Conclusions: Our results highlight that N and P stimulate the abundance of C functional genes via plant biomass and soil property traits in saline-sodic soils. [ABSTRACT FROM AUTHOR]