AISI 304 austenitic stainless steel was low-temperature liquid nitrided in a molten salt bath at 703 K for 8 h, which produced a 3-layered structure consisting of a top oxide layer, an intermediate nitrogen-rich layer and a bottom carbon-rich layer. The effect of nitriding on its corrosion resistance was investigated in a H2S environment. The corrosion rate of the untreated sample is about 3.3 times that of the nitrided sample after H2S corrosion. Corrosion pits can be clearly observed on the surface of the untreated sample, while the nitrided sample surface remained relatively intact. Both the oxide layer and the nitrogen-rich layer can help reduce the hydrogen permeation, which is beneficial for combating hydrogen embrittlement. The corrosion products mainly consisted of oxides, hydroxides, and sulfates. The nitrided layers can serve as a barrier to corrosion, thus preventing the corrosion of the substrate material. Active nitrogen in the nitrided layer reacts with H ions to form NH4 + , which effectively prevents further acidification of the local area and inhibits the occurrence of pitting corrosion and the dissolution rate of the metal in the etching hole, thus improving the local corrosion resistance of the stainless steel.