Genetically encoded fluorescent protein and fluorogenic RNA sensors are indispensable tools for imaging biomolecules in cells. To expand the toolboxes and improve the generalizability and stability of this type of sensor, we report herein a genetically encoded fluorogenic DNA aptamer (GEFDA) sensor by linking a fluorogenic DNA aptamer for dimethylindole red with an ATP aptamer. The design enhances red fluorescence by 4-fold at 650 nm in the presence of ATP. Additionally, upon dimerization, it improves the signal-to-noise ratio by 2-3 folds. We further integrated the design into a plasmid to create a GEFDA sensor for sensing ATP in live bacterial and mammalian cells. This work expanded genetically encoded sensors by employing fluorogenic DNA aptamers, which offer enhanced stability over fluorogenic proteins and RNAs, providing a novel tool for real-time monitoring of an even broader range of small molecular metabolites in biological systems.