The corrosion inhibition efficiency of Betaine, 3-(N, N-dimethyldodecylammonio) propanesulfonate (SB3–12) and 2-(DodecyldiMethylaMMonio) acetate (BS-12) on Q235 steel in 1 mol⋅L−1 hydrochloric acid (HCl) solution were studied at various inhibitor concentration and temperature by means of the weight loss method (WLM), electrochemical impedance spectroscopy (EIS), potential polarization curve, atomic force microscope (AFM), X-ray photoelectron spectroscopy (XPS), Raman spectra, scanning electron microscopy (SEM) and electronic energy spectrum analyzer (EDS). The weight loss results showed that the increase of inhibition efficiency mainly attributed to its high concentration. While Betaine had almost no protective effect for metals, SB3–12 and BS-12 were powerful inhibitors with the inhibition efficiency of 89.06% and 95.98%, respectively at 1 × 10−1 mol⋅L−1 at 30 °C. The blocking effect of BS-12 for metal corrosion that induced by HCl was stronger than SB3–12. The potential polarization curve potential demonstrated that SB3–12 and BS-12 were both mixed type corrosion inhibitors. The surface analysis results revealed that SB3–12 or BS-12 could be well adsorbed on the Q235 surface to form a compact membrane that is responsible for the protection of Q235 steel from corrosion. The theoretical calculations including quantum chemical calculations and molecular dynamics simulations, which based on density functional theory provided strong evidence for the close relationship between the molecular structure of inhibitor and its inhibition efficiency. Our study of corrosion inhibition efficiency of green betaine type surfactants laid a theoretical foundation for the application of betaine derivatives in metal anti-corrosion.