Water contamination by harmful chemicals is a growing global concern, creating a need to develop technologies that can detect a range of target compounds at the required concentrations. Here, we address this need by merging biological allosteric transcription factors with DNA-coated nanomechanical microcantilevers to detect chemicals in water with a digital readout. After proof-of-concept demonstration and optimization to detect anhydrotetracycline with the TetR transcription factor, we use the CadC transcription factor to detect Pb2+ and Cd2+ in water at concentrations down to 2 and 1 ppb, respectively, in less than 15 min. A computational model suggests this improvement in sensitivity could be achieved by the DNA-coated microcantilever surface changing the transcription factor binding properties. Our findings demonstrate a promising approach for water quality monitoring with fast, highly sensitive, digital readout.