The invention discloses a preparation method and application of a slag-fly ash geopolymer, and the preparation method comprises the following steps: (a) using sodium silicate, sodium hydroxide solid and water to prepare an alkali activator through magnetic stirring, and conducting sealing and standing; (b) grinding and sieving the furnace slag, and uniformly stirring the ground furnace slag and low-calcium fly ash, stirring and mixing the slag and low-calcium fly ash mixture and an alkali activator to prepare slurry; (c) uniformly smearing Vaseline in a triple mold, injecting the slurry in three times, and after filling is completed, performing strickling and vibration treatment to prepare a prototype sample; and (d) sealing the prototype sample with a preservative film, conducting curing at normal temperature, and conducting demolding to obtain a finished product. The preparation method is simple in process and low in production cost, and the effect of treating waste with waste is achieved; and meanwhile, the prepared geopolymer has the characteristics of high compressive strength and good curing and repairing effect on heavy metal polluted soil, and is beneficial to solving the problem of heavy metal pollution of the soil.