Appropriate fertilization is an important management practice for optimizing the nutritional quality and increasing the phosphorus use efficiency (PUE) of field‐grown alfalfa (Medicago sativa L.). A 2‐yr field experiment in 2017 and 2018 in Xinjiang, China, involving fertilization with different amounts of N (0, 105, and 210 kg ha−1, referred to as N0, N1, and N2, respectively) and P (0, 50, 100, and 150 kg ha−1, referred to as P0, P1, P2, and P3, respectively) was established and resulted in the production of high‐quality alfalfa under drip irrigation. The crude protein (CP) content in the N1 treatment was greater than that in the N2 treatment under the P0, P2, and P3 treatments. Compared with that in the N1P0 and N2P3 treatments, the relative feed value (RFV) in the N1P2 treatment increased by 9−21% and 8−18%, respectively. The annual total CP yield in the N1P2 treatment was the greatest. Compared with that in the N1P3 treatment, the total PUE in the N1P2 treatment increased by 76.69−99.69%. At each clipping, the CP yield and PUE of alfalfa were significantly different between the N and P treatments. Therefore, we conclude that when N was applied at 105 kg ha−1 and P was applied at 100 kg ha−1, alfalfa presented the greatest nutritional quality and PUE under drip irrigation.