This study aims to develop fouling-resistant membranes utilizing zwitterionic polymers for an integrated electrocoagulation (EC) and nanofiltration (NF) process to effectively remove microcystin-LR (MC-LR). The fabricated membranes were thoroughly characterized through contact angle measurements, Fourier-transform infrared spectroscopy (FTIR), scanning electron microscopy (SEM), and X-ray photoelectron spectroscopy (XPS). The efficacy of these modified membranes was investigated for synthetic microcystin removal, employing both commercial NF 270 membranes and modified NF 270 with zwitterionic polymers. Furthermore, real lake water containing microcystin was subjected to crossflow filtration using both commercial and modified NF membranes. The results indicated that the zwitterionic polymer-modified membranes demonstrated significantly better fouling resistance, with flux decline reduced from 37% to 15.5%, and improved microcystin-LR removal from 95% to 99.5% compared to unmodified membranes. To further enhance performance and meet drinking water standards, an EC step was implemented as a pretreatment for microcystin removal. The integrated EC-NF system exhibited superior performance, achieving complete MC-LR removal (below detection limit) and a 27% improvement in flux compared to the individual processes of either EC or NF. This enhancement in performance suggests the potential of this innovative integrated membrane system for applications in water treatment processes, particularly in addressing challenges related to fouling and contaminant removal. The comprehensive analysis and promising outcomes presented in this study contribute valuable insights to the advancement of membrane technology for sustainable water purification.