Proper water and fertilizer management strategies are essential for alfalfa cultivation in arid areas. However, at present, the optimal amounts of subsurface irrigation and nitrogen (N) supply for alfalfa ( L.) cultivation are still unclear. Therefore, a field experiment was conducted in 2022 in Yinchuan, Ningxia, China, to explore the effects of different subsurface irrigation levels (W, 50% of ET (crop evapotranspiration); W, 75% of ET; W, 100% of ET) and N application rates (N, 0 kg/ha; N, 75 kg/ha; N, 150 kg/ha; N, 225 kg/ha; N, 300 kg/ha) on alfalfa yield, crop water productivity (CWP), N use efficiency (NUE), quality, and economic benefits. Besides, the least squares method and multiple regression analysis were used to explore the optimal water and N combination for alfalfa cultivation under subsurface irrigation. The results showed that the alfalfa yield, crude ash content, and partial factor productivity from applied N (PFPN) were the highest under W level, but there was no difference in PFPN compared with that under W level. The branch number (BN), leaf area index (LAI), yield, CWP, irrigation water productivity (IWP), crude protein content (CPC), and economic benefits increased and then decreased with the increase of N application rate, reaching a maximum at the N or N level, while the NUE and PFPN decreased with the increase of N application rate. Considering the yield, CWP, NUE, quality, and economic benefits, WN treatment was the optimal for alfalfa cultivation under subsurface irrigation. Besides, when the irrigation volume and N application rate were 69.8 ~ 88.7% of ET and 145 ~ 190 kg/ha, respectively (confidence interval: 85%), the yield, CPC, and economic benefits reached more than 85% of the maximum. This study will provide technique reference for the water and N management in alfalfa cultivation in Northwest China.