The invention discloses a filming corrosion inhibitor, which at least comprises 30 to 50 percent of octadecylamine, 20 to 30 percent of imidazoline amide, and reducing agent carbohydrazide being the rest, the above proportion is mass percentage. Under the condition that the temperature is 150 to 500 DEG C, the concentration of the filming corrosion inhibitor is 10 to 35 ppm, the pH valve is 7 to 11, and the time duration is 1 h to 10 min, the filming corrosion inhibitor can produce a compact protective film on the metal surface, and the function of preventing the metal to be corroded in the atmospheric environment is realized, especially the invention can be applied during the thermal power plant to stop the boilers for protection, the protective film with strong hydrophobicity and good erosion resistance can be produced on the metal surface inside the water vapor system of the thermal equipment, and the thermal equipment can be protect from being corroded for more than 8 months during the exposition in atmospheric environment, simultaneously, the invention has certain cleaning, uncovering, and removing function to the incrustation and the corrosion product on the metal surface of the thermal system, the probability of the thermal equipment corrosion and the four-tube blasting is reduced, the invention is advantageous for extending the acid pickling cycle of the boiler, the service life of the equipment is prolonged, the security is enhanced, and the economic benefit is increased.