The anticancer leuprorelin was found to have excellent affinity to ochratoxin A (OTA), with an equilibrium constant of 2.2 × 10 8 M -1 at 273 K (dissociation constant Kd = 4.5 nM) when functionalized into a mesoporous polymer for binding to OTA. Binding between the surface-bound leuprorelin and mycotoxin was corroborated using DFT-based analysis, and it was extended to extraction of OTA from heavily fatty matrices of coffee, achieving 95% recovery with improved cyclability as compared with immunoaffinity.