In food safety evaluation, aflatoxin B1 (AFB1) is an important indicator. In this work, we developed an AFB1 electrochemical aptasensor based on a tetrahedral DNA nanostructures (TDNs) immobilized three dimensionally ordered macroporous MoS2–AuNPs hybrid (3DOM MoS2–AuNPs) recognition interface and horseradish peroxidase (HRP) functionalized magnetic signal amplifier. To greatly enhance the recognition efficiency, sensitivity, and stability of the aptasensor, the AFB1 aptamer-incorporated TDNs were ingeniously combined with the 3DOM MoS2–AuNPs film for the construction of the sensing interface. The aptamers would release from the electrode surface after they reacted with AFB1, and then the hybridization-free TDNs formed. Thus, the biocomposite of DNA helper strands (H1)/HRP functionalized AuNPs-SiO2@Fe3O4 nanospheres would combine with the hybridization-free TDNs due to the hybridization of H1 and TDNs. The more AFB1 existed in the solution, the more H1/HRP-AuNPs-SiO2@Fe3O4 could be combined onto the 3DOM MoS2–AuNPs surface. The current response coming from HRP-catalyzed reduction of H2O2 using thionine (Thi) as electrochemical probe was proportional with the AFB1 concentration. Upon optimal conditions, the aptasensor showed specificity for AFB1, achieving a good linear range of 0.1 fg/mL–0.1 μg/mL and the detection limit of 0.01 fg/mL. Furthermore, the developed aptasensor was also applied for detecting AFB1 content in rice and wheat powder samples, obtaining good results in conformity with those achieved from the high-performance liquid chromatography tandem mass spectrometry (HPLC-MS) method.