Carbon steels are widely used as infrastructure components owing to their high strength, ductility, and weldability. However, as corrosion degrades critical infrastructure components, exploring the relationship between the microstructure and corrosion resistance of carbon steel is of particular interest in engineering. To analyze this relationship, it is first essential to evaluate the corrosion resistance of each microstructure in a carbon steel specimen with a single chemical composition to eliminate the effects of alloying elements. In this study, we compared the pitting corrosion resistance of four microstructures (water-quenched martensite, tempered martensite, bainite and degenerate pearlite, and ferrite-pearlite) of an AISI 1045 medium-carbon steel. The pitting corrosion resistances of the microstructures in near-neutral pH solutions containing NaCl were ordered as follows: (high) water-quenched martensite > bainite and degenerate pearlite > tempered martensite > ferrite-pearlite (low). Elucidating the effect of the microstructure on the pitting corrosion resistance may contribute to the development of corrosionresistant carbon steels with excellent mechanical properties.