The invention discloses a phosphorus-based grouting filling material suitable for old goaf treatment. The phosphorus-based grouting filling material is prepared through the following steps: uniformly mixing, by weight, 40-60 parts of phosphorus slag powder, 30-40 parts of fly ash, 6-10 parts of an active activator and 3-8 parts of an expanding agent, adding the above obtained mixture, 0.5-1.5 parts by weight of a water reducer, 0.5-1 part by weight of a water retaining agent and 30-50 parts by weight of water to a stirring pool, uniformly stirring, adding 100-200 parts by weight of phosphorus tailings, and uniformly stirring. The phosphorus-based grouting filling material has the advantages of fast strength development, high filling efficiency, no shrinkage, and suitableness for long-distance pumping, the initial setting time is not smaller than 70min, the final setting time is not greater than 200min, the initial fluidity is not smaller than 300mm, the 30min fluidity retention value is not smaller than 260mm, the 1d compressive strength is not smaller than 4.9MPa, the 7d comprehensive strength is not smaller than 8.8MPa, the 28d compressive strength is not smaller than 12.9MPa, and the vertical expansion rate is not smaller than 0.1%.