Although nanozymes have been widely developed, accurate design of highly active sites at the atomic level to mimic the electronic and geometrical structure of enzymes and the exploration of underlying mechanisms still face significant challenges. Herein, two functional groups with opposite electron modulation abilities (nitro and amino) were introduced into the metal–organic frameworks (MIL-101(Fe)) to tune the atomically dispersed metal sites and thus regulate the enzyme-like activity. Notably, the functionalization of nitro can enhance the peroxidase (POD)-like activity of MIL-101(Fe), while the amino is poles apart. Theoretical calculations demonstrate that the introduction of nitro can not only regulate the geometry of adsorbed intermediates but also improve the electronic structure of metal active sites. Benefiting from both geometric and electronic effects, the nitro-functionalized MIL-101(Fe) with a low reaction energy barrier for the HO* formation exhibits a superior POD-like activity. As a concept of the application, a nitro-functionalized MIL-101(Fe)-based biosensor was elaborately applied for the sensitive detection of acetylcholinesterase activity in the range of 0.2–50 mU mL−1 with a limit of detection of 0.14 mU mL−1. Moreover, the detection of organophosphorus pesticides was also achieved. This work not only opens up new prospects for the rational design of highly active nanozymes at the atomic scale but also enhances the performance of nanozyme-based biosensors.