Nitrogen (N) and phosphorus (P) fertilizers change the morphological structure and effectiveness of P in the soil, which in turn affects crop growth, yield, and quality. However, the effects and mechanism of combined N and P application on the content of P fractions and the transformation of effective forms in alfalfa (Medicago sativa L.) production is unclear. This experiment was conducted with four levels of N: 0 (N0), 60 (N1), 120 (N2) and 180 kg·ha-1 (N3); and two levels of P (P2O5): 0 (P0) and 100 kg·ha-1 (P1). The results indicated that, under the same N level, P application significantly increased soil total N, and total P, available P, and content of various forms of inorganic P when compared to no P application, while decreasing the content of various forms of organic P and pH value. In general, under P0 conditions, soil total N content tended to increase with increasing N application, while total P, available P content, pH, inorganic P content in all forms, and organic P content in all forms showed a decreasing trend. When compared to no N application, insoluble P (Fe-P, O-P, Ca10-P) of the N application treatments was reduced 2.80 - 22.72, 2.96 - 20.42, and 5.54 - 20.11%, respectively. Under P1 conditions, soil total N and O-P tended to increase with increasing N application, while, pH, Ca2-P, Al-P, Fe-P, Ca10-P, and organic P content of each form tended to decrease. Total P, available P, and labile organic P (LOP) of N application reduced 0.34 - 8.58, 4.76 - 19.38, and 6.27 - 14.93%, respectively, when compared to no application. Nitrogen fertilization reduced the soil Ca2-P ratio, while P fertilization reduced soil Fe-P, moderately resistant organic P (MROP), and highly resistant P (HROP) ratios, and combined N and P elevated the Ca8-P to LOP ratio. The results of redundancy analysis showed that soil total N content, available P content, and pH were the key factors affecting the conversion of P fractions in the soil. Nitrogen and P reduced the proportion of soil insoluble P, promoted the activation of soil organic P, resulting in accumulation of slow-acting P in the soil, thereby improving the efficiency of soil P in alfalfa production.