The invention discloses a method for chemically treating sludge and application. The method comprises the following steps: placing sludge in a stirring tank, adjusting the water content to 20 to 99 percent, and obtaining sludge slurry; and adding a macromolecular binding material, a sludge improver and a functional additive into the sludge slurry A, mixing, stirring, introducing gas, and obtaininga sludge purificant. According to the requirements of an application field and an application objective, a porous solid product with excellent mechanical performance can be obtained by spraying, smearing, salivating, filling, and irrigating the sludge purificants, the product has no dissolved sludge and is unlikely to scatter, so that the product is convenient to store and transport and light andsanitary to use; and in addition, after being cured, the sludge purificants are porous, permeable, hydrophilic, capable of retaining water, and sufficient in nutrition, capable of providing a good root ecological environment to the plant and capable of promoting the harmless natural degradation of the sludge, before the treatment, the sludge does not need to be settled, filtered, calcined or buried, so that the problems of the traditional sludge treatment method that the energy consumption is large, the period is long, the cost is high, and the procedures are complicated and the like can be solved.