The present invention relates to a polyphosphoric acid calcium magnesium fertilizer prepared by using phosphoric acid and phosphorus tailings as raw materials and a preparation method therefor. The polyphosphoric acid calcium magnesium fertilizer is prepared by using phosphorus tailings and phosphoric acid as raw materials. Based on P2O5, MgO and CaO, in the polyphosphoric acid calcium magnesium fertilizer: total phosphorus is 50-68%, effective phosphorus is 47-66%, total magnesium is 5-18%, effective magnesium is 4-15%, total calcium is 11-20%, effective calcium is 10-18%, and all are expressed in mass percentage. Based on P2O5, the polymerization rate of the polyphosphoric acid calcium magnesium fertilizer is ≥50%. The present invention also provides a preparation method for the fertilizer. The phosphorus in the product prepared by the invention has sustained-release properties. The fertilizer is well suited for crops requiring large amounts of calcium and magnesium.