Aflatoxins are among the most toxic mycotoxins and pose a severe threat to food safety and human health. In addition to the direct monitoring of aflatoxin B1 (AFB1), simultaneous detection of its key biosynthesis gene, aflD, can effectively indicate the presence of toxin-producing strains, thereby enhancing the early screening and traceability of AFB1 contamination. Due to the significant functional differences among various biomarkers, performing multi-target analysis on a single detection interface remains challenging. Herein, we constructed a novel dual-target electrochemiluminescence (ECL) biosensor for the sequential and quantitative detection of the aflD gene and AFB1. This sensor innovatively integrates a dual-output toehold-mediated strand displacement (TMSD) and CRISPR/Cas12a trans-cleavage mechanisms to establish a dynamic "signal writing-erasing" regulation on a single ECL emitter. Specifically, aflD triggers the TMSD reaction, driving the enrichment of ferrocene (Fc)-labeled DNA at the electrode interface and quenching the ECL signal, corresponding to signal "write" (signal-off). Subsequently, AFB1 is converted via aptamer recognition into an activator DNA that initiates Cas12a trans-cleavage, leading to the removal of Fc-DNA from the interface and recovery of ECL emission, corresponding to signal "erase" (signal-on). This strategy enables cross-category detection and quantitative analysis of small-molecule toxins and nucleic acid biomarkers within a single luminescence system, effectively avoiding signal crosstalk while offering high sensitivity, high specificity, and high interfacial utilization efficiency. It provides a versatile new approach for the early warning and source tracing of contaminants in complex food matrices.