In this work, we developed a ratiometric fluorescence/colorimetric dual-mode sensor based on the synergistic recognition of aptamer and molecularly imprinted polymers (MIPs) for ultrasensitive detection of AFB1. Polydopamine/carbon dots-functionalized Fe3O4 (MIP/CDs/Fe3O4) serves as both a reference probe and a recognition element. The aptamer-modified Rhodamine 6G-embedded ZIF-8 (Apt-Rh6G@ZIF-8) acts as both a fluorescence probe and a colorimetric probe, enabling simultaneous dual-mode detection. In the presence of AFB1, AFB1 is captured by the MIP/CDs/Fe3O4 via molecular recognition, forming sandwich-structured particles designated as MIP/CDs/Fe3O4∼AFB1∼Apt-Rh6G@ZIF-8. These complexes are magnetically separated, allowing ratiometric fluorescence analysis based on the CDs/Rh6G. Simultaneously, the unbound Apt-Rh6G@ZIF-8 remaining in the suspension exhibits visible color changes, achieving colorimetric analysis. The sensor demonstrates a linear range of 0.01-15 ng mL-1 (fluorescence) and 0.1-15 ng mL-1 (colorimetric), with detection limits as low as 8.5 pg mL-1 (fluorescence) and 15 pg mL-1 (colorimetric), respectively. Notably, the platform achieved accurate AFB1 quantitation in crude edible oil samples without pretreatment, demonstrating its high practicality for real-world applications.