Aflatoxins, especially aflatoxin B1 (AFB1), are the most prevalent mycotoxins in nature. They contaminate various crops and cause global food and feed safety concerns. Therefore, a simple, rapid, sensitive, and specific AFB1 detection tool is urgently needed. Aptamers generated by SELEX technology can specifically bind the desired targets with high affinity. The broad range of targets expands the scope of applications for aptamers. We used an AFB1-immobilized magnetic nanoparticle for SELEX to select AFB1-specific aptamers. One aptamer, fl−2CS1, revealed a dissociation constant (Kd = 2.5 μM) with AFB1 determined by isothermal titration calorimetry. Furthermore, no interaction was shown with other toxins (AFB2, AFG1, AFG2, OTA, and FB1). According to structural prediction and analysis, we identified a short version of the AFB1-specific aptamer, fl−2CS1/core, with a minimum length of 39-mer used in the AFB1-aptasensor system by real-time qPCR. The aptasensor showed a broad range of detection from 50 ppt to 50 ppb with an accuracy of 90% in the spiked peanut extract samples. With the application of the AFB1-aptasensor we have constructed, a wide range detection tool with high accuracy might be developed as a point-of-care testing tool in agriculture.