This study explored the impact of varying nitrate to sulfide (N/S) ratios on nitrogen removal efficiency (NRE) in the sulfide-driven autotrophic denitrification and anammox (SDAD-anammox) system. Optimal nitrogen removal was observed at N/S ratios between 1.5 and 2.0. Isotope tracing results showed that the contribution of anammox to nitrogen removal was enhanced with increasing N/S ratios, reaching up to 37 % at the N/S ratio of 2.5. Additionally, complex nitrogen pathways were identified, including dissimilatory nitrate reduction to ammonium (DNRA). Furthermore, isotope tracing was innovatively applied to investigate N2O emissions, demonstrating that higher N/S ratios significantly reduced N2O emissions, with the lowest emissions at N/S ratio of 2.5. Gene expression analysis indicated that nitrogen and sulfide transformation genes decreased with increasing N/S ratios, while anammox-related genes first increased and then decreased, reflecting the system's microbial dynamics. These findings offer insights into nitrogen transformation pathways and N2O production mechanisms in the SDAD-anammox process.