Agriculture is a main source of nitrous oxide (N2O) emissions. In agricultural systems, direct N2O emissions from nitrogen (N) addition to soils have been widely investigated, whereas indirect emissions from aquatic ecosystems such as ditches are poorly known, with insufficient data available to refine the IPCC emission factor. In this contribution, in situ N2O emissions from two ditch water‒air interfaces based on a diffusion model were investigated (almost once per month) from June 2021 to December 2022 in an intensive arable catchment with high N inputs and salt-affected conditions in the Qingtongxia Irrigation District, northwestern China. Our results implied that agricultural ditches (mean 148 μg N m−2 h−1) were significant sources for N2O emissions, and were approximately 2.1 times greater than those of the Yellow River directly connected to ditches. Agronomic management strategies increased N2O fluxes in summer, while precipitation events decreased N2O fluxes. Agronomic management strategies, including fertilization (294–-540 kg N hm−2) and irrigation on farmland, resulted in enhanced diffuse N loads in drain water, whereas precipitation diluted the dissolved N2O concentration in ditches and accelerated the ditch flow rate, leading to changes in the residence time of N-containing substances in water. The spatial analysis showed that N2O fluxes (202–233 μg N m−2 h−1) in the headstream and upstream regions of ditches due to livestock and aquaculture pollution sources were relatively high compared to those in the midstream and downstream regions (100–114 μg N m−2 h−1). Furthermore, high available carbon (C) relative to N reduced N2O fluxes at low DOC:DIN ratio levels by inhibiting nitrification. Spatiotemporal variations in the N2O emission factor (EF5) across ditches with higher N resulted in lower EF5 and a large coefficient of variation (CV) range. EF5 was 0.0011 for the ditches in this region, while the EF5 (0.0025) currently adopted by the IPCC is relatively high. The EF5 variation was strongly controlled by the DOC:DIN ratio, TN, and NO3−-N, while salinity was also a nonnegligible factor regulating the EF5 variation. The regression model incorporating NO3−-N and the DOC:DIN ratio could greatly enhance the predictions of EF5 for agricultural ditches. Our study filled a key knowledge gap regarding EF5 from agricultural ditches in salt-affected farmland and offered a field investigation for refining the EF5 currently used by the IPCC.