Bacterial biofilms are the primary cause of infections in medical implants and catheters. Delayed detection of biofilm infections contributes to the widespread use of high doses of antibiotics, leading to the emergence of antibiotic-resistant bacterial strains. Accordingly, there is an urgent need for systems that can rapidly detect and treat biofilm infections in situ. As a step toward this goal, in this work we have developed for the first time a threshold-activated feedback-based impedance sensor-treatment system for combined real-time detection and treatment of biofilms. Specifically, we demonstrate the use of impedimetric sensing to accurately monitor the growth of Escherichia coli biofilms in microfluidic flow cells by measuring the fractional relative change (FRC) in absolute impedance. Furthermore, we demonstrate the use of growth measurements as a threshold-activated trigger mechanism to initiate successful treatment of biofilms using bioelectric effect (BE), applied through the same sensing electrode array. This was made possible through a custom program that (a) monitored the growth and removal of biofilms within the microfluidic channels in real-time and (b) enabled the threshold-based activation of BE treatment. Such BE treatment resulted in a ∼74.8 % reduction in average biofilm surface coverage as compared to the untreated negative control. We believe that this smart microsystem for integrated biofilm sensing and treatment will enable future development of autonomous biosensors optimized for accurate real-time detection of the onset of biofilms and their in situ treatment, directly on the surfaces of medical implants.