A cationic, Ammonium quaternary surfactant, obtained from avocado essential oil has been used as a corrosion inhibitor for LDX 2101 duplex stainless steel in a CO2-saturated 3.5% NaCl solution. Used techniques involved potentiodynamic polarization curves and electrochemical impedance spectroscopy. Results have shown that ammonium quaternary salt was an efficient mixed type of inhibitor although it affected more strongly the cathodic electrochemical reactions, with a decrease in the corrosion and current density and an increase in the pitting potential values; inhibitor had an efficiency that increased with its concentration from 0 to 25 ppm, but it decreased for higher concentrations. Inhibitor was adsorbed onto the steel surface on a mixed chemical-physical way dominated by a chemical type of adsorption, following a Langmuir type of adsorption isotherm. Corrosion process was charge transfer controlled and it was unaffected by the addition of the inhibitor. Theoretical studies in order to determine the relationship between electronic inhibitor properties and its inhibition efficiency have been carried out by using the DFT methodology.