The corrosion behavior of L245NS steel with different gas environments and H2S concentrations in CO2-O2-H2S environment were studied by weight-loss test and surface characterization techniques. It was found that in the CO2-O2-H2S environment, the H2S, CO2, and O2 reacted successively, and the deposition and hydrolysis acidification of elemental sulfur aggravated the occurrence of localized corrosion. When H2S changed in the low concentration range (1000 – 5000 ppmv), the reaction was dominated by the gradual development of the dense inner film, which decreased the corrosion degree. At 10,000 ppmv, the solution pH value would decrease. More H2S was involved in hydrogen evolution corrosion and enhanced the synergistic effect with O2 to accelerate the corrosion.