The corrosion inhibition performances of octadecylamine (OCT) and tetradecyl trimethyl ammonium bromide (TTAB) for carbon steels in H2S and CO2 brine solution were investigated by weight loss, potentiodynamic polarization, molecular dynamic simulation and XPS analysis. TTAB showed better inhibition effects on H2S and CO2 induced corrosion than OCT. Synergistic corrosion inhibition effect was found between OCT and TTAB with proper mass ratios and the best inhibition performance was achieved with 10mgL−1 OCT and 20mgL −1 TTAB. The synergism was correlative to the fractional free volume of the inhibitor film of OCT and TTAB.