In vitro selection methods allow for isolation of DNAzymes (catalytic DNAs) from random DNA pools. Here we describe a fluorogenic DNAzyme, LYF5, isolated using a double-random selection approach: a random DNA pool was selected against a complex molecular mixture derived from a breast cancer cell line, T47D. LYF5 specifically indicates the T47D breast cancer cell line with high sensitivity. After sequence optimization, the second-generation DNAzyme, 2G-LYF5, exhibited an approximately 2-fold higher cleavage percentage. Finally, we have determined that the intramolecular stem-loop motif plays a crucial role in 2G-LYF5 activity. Our findings underscore the capability of single-stranded DNA molecules to perform highly sophisticated functions that are amenable to the development of diagnostic tests for early identification of breast cancer.