This study presents the development of a biomimetic optic sensor for the detection of Enterococcus faecalis, a common fecal contaminant found in drinking water. The sensor utilizes a molecularly imprinted nanofilm, created by combining gold nanoparticles. Extensive characterization and analysis were conducted to evaluate the performance of the optic sensor, including kinetic, selectivity, reusability and real sample studies for real-time detection of Enterococcus faecalis. The results demonstrate that the optic sensor exhibits remarkable detection capabilities, offering a low detection limit of 6.6×103 cfu/mL and a high determination coefficient (R2 = 0.9886) within the Enterococcus faecalis concentration range of 5×104 – 1×108 cfu/mL. Importantly, the sensor proves effective not only in buffer solutions but also in water sample solutions, showcasing its practicality for real-world applications. Based on these findings, it can be concluded that the developed optic sensor shows promising potential for the detection of other bacteria, offering a cost-effective solution with enhanced sensitivity. Its versatility extends across diverse fields, including environmental monitoring and medical diagnosis. With its impressive performance, the optic sensor represents a valuable tool for ensuring water safety and advancing bacterial detection technologies.