In this study, the effect of penicillin V (a common antibiotic in the treatment of infectious diseases) as an environmentally friendly inhibitor on low carbon steel in the simulated acidic sour water corrosion (corrosive oxygenated solution based on Na2S þ Na2SO4; pH ¼ 3) were investigated by potentiodynamic polarization and immersion tests at different temperatures and concentrations of the inhibitor. The results showed that at a concentration of 500 ppm at 25 �C, the inhibition efficiency was 94.2%, which decreased with increasing temperature. The results of the FTIR test from the surface of the samples indicate the possible formation of compounds of nitrogen-hydrogen, carbon-nitrogen, and generally nitrogen with heteroatoms as well as the presence of oxygenated compounds similar to those of organic compounds. The surface adsorption of the in- hibitor accomplishes the inhibition mechanism onto the metal surface, and its adsorption is carried out following the Langmuir adsorption isotherm. Thermodynamic parameters were also calculated and discussed. UV–vis analysis results showed that the inhibitor on the metal surface formed complexes with metal ions through its functional groups. The complex built on the metal surface occupies a large surface area and by blocking the metal from corrosive factors, it reduces the charge and ion transfer at the metal surface and increases its corrosion resistance.