The invention discloses an environment-friendly corrosion and scale inhibitor for a boiler. The environment-friendly corrosion and scale inhibitor is prepared from deionized water, sodium sulfonate, potassium sulfonate, benzotriazole, 2-acrylamide-2-methyl propane sulfonic acid, dodecyl dimethyl benzyl ammonium chloride, methyl alcohol, alkylphenol polyoxyethylene, hexamine, sodium tungstate and lignin sulfonate. The environment-friendly corrosion and scale inhibitor is applicable to dealing with scaling and corrosion problems of heat equipment such as the boiler; the phosphorus value in discharged water is 0.1 to 0.3 mg/L, appear of calcium phosphate scale precipitates can be prevented, the risk of eutrophication of water is reduced, the quality is reliable, and the tolerance is high; the inhibitor is high in applicability and can be prevented from being deposited on a high-temperature heat exchanger, and the service life of the boiler can be greatly prolonged; with the advantages of low dosage, efficiency and energy conservation, the inhibitor can be used in water with high alkalinity, high hardness, high pH value and high concentration multiple; all the components generate the synergistic effect; and the corrosion rate to carbon steel is 0.001 to 0.003 mm a<-1>, and the scale inhibition rate is 98.5 percent to 99.5 percent.