© 2021 Elsevier B.V.Currently, there are several types of corrosion inhibitors were studied. The new type of corrosion inhibitor based on a gossypol derivative was first introduced. The anti-corrosion performance of 6-aminopenicillanic acid sodium gossypol (APASG) for St2 steel in a 1 M HCl + 1 M KCl solution was reported for the first time, and the inhibition properties of this material were fully characterized by gravimetric analysis, thermodynamic analysis, potentiodynamic polarization (PDP), electrochemical impedance spectroscopy (EIS), electrochemical noise (EN) analysis, electrochemical frequency modulation (EFM), density functional theory (DFT), molecular dynamics (MD) simulations, scanning electron microscopy (SEM) and energy dispersive X-ray spectrometry (EDX). The obtained results show that APASG is an excellent anti-corrosion inhibitor (97% at 100 mg/L/0.104 mM) at intermediate temperatures (303−333K). APASG adsorbed onto a metal surface by a physical and chemical adsorption mechanism, as shown by the Langmuir adsorption isotherms. Electrochemical analyses show that APASG acts as a mixed-type inhibitor. The thermodynamic adsorption data were measured and discussed. SEM-EDX tests of the inhibited steel sample show that the inhibitor significantly improved the surface morphology. DFT calculations indicated that the broadly stretched linked functional groups (hydroxyl and carboxyl) and heteroatoms (nitrogen, oxygen and sulfur) in the inhibitor structure are responsible for the inhibition efficiency of APASG. The obtained DFT and MD simulation data supported the experimental results.