In this manuscript, a sensitive and selective molecular imprinted electrochemical sensor for the detection of bisphenol A diglycidyl ether (BADGE) in canned oil was developed. Using BADGE as template, pyrrole as functional monomer, after electropolymerization and elution processes, the molecular imprinted film for the special recognition of BADGE was prepared on the surface of platinum disk electrode. Every step in the experiment was verified by field emission scanning electron microscope (SEM), microscopic fourier transform infrared spectroscopy (Micro‐FTIR), cyclic voltammetry (CV) and differential pulse voltammetry (DPV). The experimental parameters in the assay were optimized, and the linear range of the MIP sensor was 0.05 μmol dm−3 to 10 μmol dm−3 with the detection limit of 0.04 μmol dm−3 based on S/N=3. The sensor was applied to edible oil samples for detection with a good accuracy, which could be used as a new strategy for sensitive, rapid, simple and cost‐effective screening of BADGE.