Corrosion of alloy materials significantly influences the stability and efficiency of the supercritical carbon dioxide (S-CO2) Brayton cycle. In this study, we investigated the corrosion behavior of the austenitic alloy SP2215 and the martensitic alloy X19CrMoNbVN11-19 (X19) in S-CO2 at 550°C and 20 MPa. The effect of impurities, H2S, on corrosion behavior was studied. After 900 hours, SP2215 formed a 1.1 μm thick oxide layer (Cr2O3). X19 formed a loose and porous double oxide layer of 4.1 μm (outer: Fe3O4, inner: FeCr2O4). After H2S doping, SP2215 had an oxide layer of 6.2 μm (FeS, SiO2, and Cr2O3), while X19 was 9.8 μm (outer: Fe3O4, SiO2, FexSy and Fe2O3, inner: FeCr2O4, Fe2SiO4 and Cr2S3). Metal sulfides formed and the corrosion layer thickened. This indicates that H2S not only changes the corrosion mechanism but also aggravates the corrosion. However, the corrosion of CO2 is dominant. SP2215 has better corrosion resistance than X19.