The regularities of the influence of hardness, strength and ductility of steels with ultrafine-grained (UFG) structure on the rate and peculiarities of corrosion in the hydrogen sulfide-containing medium in comparison with steels with the coarse-grained (CG) structure were investigated. Low-alloyed pipe steel 9MnSi5 and carbon steels: C10 and C45 were used as the materials under study. The UFG condition of the steels was obtained by equal channel angular pressing (ECAP) and by ECAP-conform. It is shown that with an increase in the amount of carbon in the CG steels subjected to normalization, and the UFG steels after ECAP, the corrosion rate in the hydrogen sulfide medium increases. With the same hardness value of steels with CG and UFG structures, the latter can have a lower or higher corrosion rate compared with CG steels, depending on the amount of carbon and heat treatment of CG steels. Moreover, the same increment of the corrosion rate in steels with a CG structure is achieved with smaller values of the h