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 (Medicago sativa 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 (W1, 50% of ETC (crop evapotranspiration); W2, 75% of ETC; W3, 100% of ETC) and N application rates (N0, 0 kg/ha; N1, 75 kg/ha; N2, 150 kg/ha; N3, 225 kg/ha; N4, 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 W2 level, but there was no difference in PFPN compared with that under W3 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 N2 or N3 level, while the NUE and PFPN decreased with the increase of N application rate. Considering the yield, CWP, NUE, quality, and economic benefits, W2N2 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 ETC 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.