Nickel–iron composites are efficient in catalyzing oxygen evolution. Here, we develop a microorganism corrosion approach to construct nickel–iron hydroxides. The anaerobic sulfate-reducing bacteria, using sulfate as the electron acceptor, play a significant role in the formation of iron sulfide decorated nickel–iron hydroxides, which exhibit excellent electrocatalytic performance for oxygen evolution. Experimental and theoretical investigations suggest that the synergistic effect between oxyhydroxides and sulfide species accounts for the high activity. This microorganism corrosion strategy not only provides efficient candidate electrocatalysts but also bridges traditional corrosion engineering and emerging electrochemical energy technologies.