The presented article is devoted to the synthesis of alkyl halogenide complexes of amidoamine fatty acids of corn oil and diethylenetriamine and the study of their inhibitory effect on carbon dioxide corrosion in an acidic environment. At the initial stage, corn oil fatty acid was isolated from a mixture of vegetable oils with a yield of 95% by hydrolysis, its structure was studied using infrared spectral analysis, and its physicochemical properties were determined. At the next stage, amidoamine was synthesized with a yield of 96% in terms of fatty acids of corn oil and diethylenetriamine, its structure was studied by infrared spectral analysis and its physicochemical properties were determined. Complexes of synthesized amidoamines and alkyl halogenides (hexyl bromide, pentyl bromide, pentyl iodide) were obtained in high yields (97%, 95%, 96%), their structure was studied by infrared spectral analysis, and their physicochemical properties were studied. 20% solutions of the obtained alkyl halogenide complexes were prepared in isopropyl alcohol and their effect on the corrosion process of C1018 steel was tested in a 1% solution of NaCl in a CO2 2 atmosphere at a concentration of 75 ppm for 5 h at a temperature of 50 degrees C and a pressure of 0.9 bar. As a result of the study, it was established that the anti-corrosion effect of a 20% solution of hexyl bromide complex in isopropyl alcohol (N-1) at a concentration of 75 ppm is 91%, and 20% solutions of complexes with pentyl bromide and pentyl iodide in isopropyl alcohol (N-2 and N-3) at a concentration of 75 ppm protect metal electrodes from CO2 2 corrosion with an anti-corrosion effect of 90%