Zearalenone (ZEN) is a nonsteroidal estrogenic mycotoxin, and its accurate detection in complex biological samples is still a challenge. Herein, an antifouling ratiometric electrochemical sensor has been developed for its detection. In this system, black phosphorus-graphene oxide is used as substrate to amplify the signal; ionic liquid doped molecularly imprinted polymer (MIP) endows the sensing surface not only high recognition ability but also high capability to resist nonspecific adsorption.