Biofouling of membranes in water treatment is considered as one of the major practical problems. A novel and an efficient approach for cleaning biofilm grown on the membrane surface is proposed by applying a direct electric current (124 mA, 90 s) through platinum electrodes inside a cross-flow ultrafiltration channel. Depending on the electrochemical reactions occurring at the electrodes, either chlorine or hydrogen-producing configuration is realized by interchanging the current polarity. Baseline determination of the amount of chlorine generated and change in pH is assessed as a function of current intensity, linear cross-flow velocity, and duration of applied current. The efficiency of the proposed method is determined by investigating electrically treated biofilm through bacterial inactivation using Confocal Laser Scanning Microscopy (CLSM), bacterial cell structure changes through Scanning Electron Microscopy (SEM), and by estimating the amount of biomass removal through Optical Coherence Tomography (OCT). When a chlorine-producing electrode is placed at the inlet of the flow cell, 68% of bacterial inactivation is achieved without any modification of bacterial cell shape. Furthermore, a high and near-complete biomass removal is achieved (99%) after a subsequent forward flush of the electrically treated biofilm. However, placing a hydrogen-producing electrode at the inlet reveals a slightly lower bacterial inactivation (65%) and lower biomass removal (77%). Additional systematic experiments using individually sodium hydroxide (NaOH), sodium hypochlorite (NaOCl), or gas microbubbles enabled to elucidate the cause of biofilm removal, synergic effect of caustic agent NaOH and microbubbles.