Abstract The paper describes a sensitive and highly stable label-free electrochemical impedance immunosensor for the determination of aflatoxin B 1 (AFB 1), which is based on the formation of silica gel–ionic liquid biocompatible film on the glassy carbon electrode. The electrochemical performances of the sensor were investigated by electrochemical impedance spectroscopy using a Fe(CN) 6 3−/4− phosphate buffer solution as base solution for test. As new ionic liquid, 1-amyl-2,3-dimethylimidazolium hexafluorophosphate, offers a very biocompatible microenvironment for AFB 1 antibody, the sensor exhibits good repeatability (RSD = 1.2%), sensitive electrochemical impedance response to AFB 1 in the range of 0.1–10 ng ml −1 and lowers the detection limit of AFB 1 (0.01 ng ml −1) . The electron-transfer resistance change of the sensor after and before incubation with AFB 1 of 2.0 ng ml −1 can retain 95% over a 180-day storage period at 4 °C. The results present a remarkable improvement of sensitivity (2-fold) and long-term stability (190-fold) when compared to classical silica gel sensor. Moreover, proposed sensor has a high selectivity to AFB 1 alone with no significant response to AFB 2, AFG 1, AFG 2 and AFM 1 as single substrates, it has been successfully applied to the determination of trace AFB 1 in bee pollen samples with a spiked recovery in the range of 96.0–102.5%.