The inhibition performance of three corrosion inhibitors against H2S and CO2 corrosions, including 1-(2-amido-thioureaethyl)-2-pentadecyl-imidazoline (A), 1-(2-methyl-thioureaethyl)-2-pentadecyl-imidazoline (B), and 1-(2-phenyl-thioureaethyl)-2-pentadecyl-imidazoline (C), has been theoretically studied using quantum chemistry calculations and molecular dynamics simulations The present conclusions were experimentally verified by weight loss and electrochemical polarization curves methods Theoretical results indicated that all the three molecules display high reaction activity The reaction activity sites mainly concentrated in the imidazole ring and heteroatoms C bore the highest reaction activity among the three molecules The ring imidazole and heteroatoms of the polar group on the hydrophilic chain preferentially adsorbed when the inhibitors reacted with metal surface, and the adsorption stability weaken gradually in the order of C, A, B Experimental results of weight loss and electrochemical polarization curves showed that the three inhibitors have excellent corrosion inhibition performance in H2S and CO2 corrosion environment, to Q235 steel corrosions, and the highest inhibition efficiencies are more than 87% With the help of the theoretical results, the efficiency order of the three inhibitors was found to be C>A>B, which accorded well with experimental results