The biocorrosion mechanism of 304 L stainless steel (SS), in contact with untreated wastewater (UTWW) and treated wastewater (TWW) in terms of biofilm growth were monitored and evaluated using electrochemical experiments, scanning electron microscopy (SEM) examinations and microbiological analyses. Within UTWW, open circuit potential (E-oc) and charge transfer resistance (R-ct) showed a significant increase after 5 days of immersion. SEM and microbiological analyses revealed that a mature biofilm was formed after 5 days of immersion and could offer a protection to the surface. However, considering the high level of chloride in TWW, according to SEM analysis, the bacterial biofilm was more porous and gelatinous. Furthermore, the significant changes in the electrochemical impedance spectroscopy (EIS) parameters were shown after 7 days of immersion. The synergy between the metal surface, aggressive compounds and bacterial cells could have great impact on corrosion process. In fact, the correlation between different experimental studies used in this investigation showed that the corrosion mechanisms are different when untreated wastewater (UTWW) was compared to treated wastewater (TWW) according to immersion time. Mechanism could be divided into two stages with the UTWW and three stages with the TWW. Furthermore, corresponding corrosion mechanisms were presented according to different immersion times.