AFB1 is a harmful substance that can be found in agricultural products and can seriously affect human health, even in trace amounts. Therefore, monitoring AFB1 levels to ensure food safety and protect public health is crucial. New, highly reliable, selective, and rapid detection methods are needed to achieve this goal. Our work involves the development of a polymeric membrane sensor using radical polymerization that can accurately detect AFB1. Various spectroscopic techniques (Fourier transform infrared spectroscopy (FT-IR) and scanning electron microscopy (SEM)) were used to obtain information about the structural and morphological properties of the prepared sensor. The sensor displayed fluorescence selectively responsive to AFB1 at the excitation wavelength of 376 nm and emission wavelength of 423 nm. The polymeric fluorescence sensor showed good sensitivity and a wide linear range from 9.61 × 10−10 and 9.61 × 10−9 mol/L for AFB1quantification. The limit of detection (LOD) is as low as 3.84 × 10−10 mol/L for AFB1. Other mycotoxins, such as aflatoxin B2 and aflatoxin G1, did not interfere with the sensor’s high selectivity towards AFB1. To test the sensor’s effectiveness in detecting AFB1 in real samples, three different grain samples – peanuts, hazelnut butter, and peanuts with a sauce known to contain AFB1 – were utilized. The results were satisfactory and demonstrated that the sensor can be successfully employed in real samples, with an error range of 0.43 % to 12.10 %.