The invention particularly relates to an environment-friendly vapor phase corrosion inhibitor and a preparation method thereof, and belongs to the field of corrosion prevention. The environment-friendly vapor phase corrosion inhibitor comprises the following components in parts by mass: 10-20 parts of an integrated slow-release material, 5-10 parts of phosphoric acid, 5-10 parts of amino acid, 1-5parts of a surfactant, 3-5 parts of phytic acid, 10-20 parts of urea, 1-5 parts of flavone, 5-10 parts of sodium gluconate and 100-150 parts of deionized water, wherein the integrated slow-release material comprises the following components in parts by mass: 15-30 parts of dopamine, 100-200 parts of N, N dimethylformamide, 5-10 parts of N, N'-carbonyl diimidazole, 5-10 parts of triethylamine and6-12 parts of acetic acid. According to the environment-friendly vapor phase corrosion inhibitor provided by the embodiment of the invention, adopted corrosion inhibition additives are environment-friendly and non-toxic materials, replace the traditional imidazoline toxic environment-friendly vapor phase corrosion inhibitor, do not cause harm to the environment and human bodies, and meet the national requirements of green, environment-friendly and sustainable materials.