Resource-based water shortages, uncoordinated irrigation, and fertilization are prevalent challenges in agricultural production. The scientific selection of appropriate water and fertilizer management methods is important for improving the utilization efficiency of agricultural resources and alleviating agricultural non-point source pollution. This study focused on wolfberry and compared the effects of four irrigation levels [full irrigation (W0, 75%-85% θf), slight water deficit (W1, 65%-75% θf), moderate water deficit (W2, 55%-65% θf), and severe water deficit (W3, 45%-55% θf)] and four nitrogen application levels [no nitrogen application (N0, 0 kg·ha-1), low nitrogen application (N1, 150 kg·ha-1), medium nitrogen application (N2, 300 kg·ha-1), and high nitrogen application (N3, 450 kg·ha-1)] on soil nitrate nitrogen (NO3 --N) transport, plant nitrogen allocation, and soil nitrous oxide (N2O) emissions during the harvest period of wolfberry. And this study used CRITIC-entropy weights-TOPSIS model to evaluate 16 water and nitrogen regulation models comprehensively. The results revealed the following: (1) The NO3 --N content of the soil decreased with increasing horizontal distance from the wolfberry. It initially decreased, then increased, and finally decreased with an increase in soil depth. The average NO3 --N content in the 0-100 cm soil layer ranged from 3.95-13.29 mg·kg-1, indicating that W0 > W1, W2, W3, and N3 > N2 > N1 > N0. (2) The soil NO3 --N accumulation ranged from 64.45-215.27 kg·ha-1 under varying water and nitrogen levels, demonstrating a decreasing trend with increasing horizontal distance. The NO3 --N accumulation at each horizontal distance increased with increasing irrigation and nitrogen application. The NO3 --N accumulation of W0N3 treatment increased by 5.55%-57.60% compared with the other treatments. (3) The total nitrogen content and nitrogen uptake in all wolfberry organs were W1 > W0 > W2 > W3, and N2 > N3 > N1 > N0. The maximum total nitrogen content and nitrogen uptake in W1N2 treatment were 3.25% and 27.82 kg·ha-1 in the roots, 3.30% and 57.19 kg·ha-1 in the stems, 3.91% and 11.88 kg·ha-1 in the leaves, and 2.42% and 63.56 kg·ha-1 in the fruits, respectively. (4) The emission flux and total emission of N2O increased with increasing irrigation and nitrogen application. The emission flux exhibited a transient peak (116.39-177.91 ug·m-2·h-1) after irrigation. The intensity of N2O emissions initially decreased and then increased with an increase in the irrigation amount. It also initially increased with increasing nitrogen application amount, then decreased, and finally increased again. The maximum emission intensity was observed under the W3N3 treatment (0.23 kg·kg-1). The N2O emission coefficients ranged from 0.17%-0.39%, in the order of W0 > W1 > W2 > W3 (except for N1) and N1 > N2 > N3. (5) Under varying water and nitrogen concentrations, N2O emission flux showed a positive linear correlation with soil pore water content and NO3 --N content and a negative linear correlation with soil temperature. The comprehensive evaluation revealed that a slight water deficit (65%-75% θf) combined with medium nitrogen application (300 kg·ha-1) decreased soil NO3 --N leaching, increased nitrogen uptake, and reduced N2O emission. These findings can serve as a reference for improving the efficiency and reducing emissions of wolfberry in the Yellow River irrigation region of Gansu Province and in similar climate zones.