Two kinds of carbon steels of different microstructures（ferrite-pearlite and martensite） with the same chemical composition were obtained by different heat treatment processes. The difference in corrosion resistance of the steels with these two kinds of microstructures was investigated by cyclic immersion corrosion test as well as scanning electron microscopy (SEM) observation, electrochemical measurement, and X-ray diffraction (XRD) analysis. The results showed that the martensitic steel exhibited a higher corrosion resistance than the steel with the microstructure consisting of ferrite and pearlite. Martensitic steel had a higher self-corrosion potential and a lower anodic corrosion current. The rust layer of martensitic steel was more compact and mainly composed of α-FeOOH.