A corrosion inhibitor comprises compositions of, by weight part ratio, 10-15 parts of sodium silicate, 5-10 parts of multivariate copolymerization sodium polyacrylate, 2-5 parts of hydroxyl ethidene diphosphonic acid, 4-9 parts of mercaptobenzothiazole, 15-20 parts of benzotriazole, 15-25 parts of sodium tripolyphosphate, 5-15 parts of ethanol, 15-20 parts of hexamethylene tetramine, 4-9 parts of imidazoline, 11-18 parts of mercaptobenzothiazole, 2-7 parts of alkyl alkamine and 3-8 parts of furfural. The corrosion inhibitor is strong in water absorbing quality and pollution-free, has wetting ability, and can reduce the freezing point of water.