Aflatoxin B1 (AFB1), a hepatotoxic and carcinogenic food contaminant, is commonly found in agricultural food. Herein, Au NPs anchored ZIF-8-derived porous carbon-ZnO (Au NPs/PCZIF-8-ZnO) was firstly synthesized to act as the sensing substrate. Then, a ratiometric electrochemical (EC) and “off–on” photoelectrochemical (PEC) dual-mode paper-based aptasensor was presented for AFB1 detection based on a distance-modulation sensing strategy. The independent signal transduction mechanisms and output mode not only broaden the dynamic detection range but also provide a self-verification to assay results, improving the sensitivity and reliability. The wide detection ranges of 0.1 pg/mL-100 ng/mL (EC mode) and 0.02 pg/mL-100 ng/mL (PEC mode) were obtained using dual-mode aptasensor, with detection limits of 36.7 and 9.3 fg/mL, respectively. The fabricated aptasensor exhibited excellent selectivity, reproducibility and stability. Furthermore, it exhibited good practicability for AFB1 assays in real samples, demonstrating great potential applications for food safety evaluation.