Nanozymes provide the required enzymatic activity however, they lack the selectivity to target a certain drug during analysis. Herein, a novel polydopamine molecularly imprinted polymer (MIP) was fabricated onto Fe3O4 nanozymes surface for sensitive and selective determination of antipyrine (ANT) and benzocaine HCl (BEN). Synthesized Fe3O4 nanozyme with peroxidase like activity catalyzed the oxidation of ortho phenylenediamine by the aid of H2O2 to produce intense yellow color that can be measured via colorimetric assay. The MIPs were prepared and characterized using field-emission scanning electronic microscopy, Fourier-transform IR spectroscopy, surface area analysis, and X-ray diffraction spectrum. Two Fe3O4 @ MIP NPs nanozyme with peroxidase like activity of two drugs were prepared. Upon binding of the target drug with its respective MIP, an inhibition in the Fe3O4 enzymatic activity occurred and thus a decrease in the yellow color produced. This quantitative decrease in the color intensity represents the drug concentration. Factors affecting the enzymatic colorimetric reaction have been investigated and optimized. The formed MIPs increased the sensitivity of the proposed method with LOD 1.405, 0.658 ng mL−1, LOQ 4.259, 1.993 and recovery percentage of 100.07, 100.57 for ANT and BEN, respectively. The reusability of the Fe3O4 @ MIP NPs was assessed for six cycles without significant loss in enzymatic oxidase activity. Furthermore, the method was validated following ICH guidelines. Then, it was successfully applied for determination of the two drugs in spiked environmental water samples and pharmaceutical formulation.