Metal-organic frameworks (MOFs) can improve the stability and activity of enzymes under the MOF encapsulation. However, it remains a challenge to explore the effects of the MOF environment on enzymatic activity in a confined space. In this work, we immobilized the enzyme inside a glass nanopore to study the catalytic activity and stability of the enzyme in the MOF environment. Horseradish peroxidase (HRP) is encapsulated in zeolitic imidazolate framework-90 (ZIF-90) and zeolitic imidazolate framework-8 (ZIF-8), which are used as the catalytic platforms. The HRP can catalyze 2,2'-azino-bis(3-ethylbenzothiazoline-6-sulfonic acid)diammonium salt (ABTS) molecules to generate ABTS+ ions, and the change of the transmembrane ion current will be monitored in real time. As the concentration of H2O2 increases, the amount of produced ABTS+ will increase; thus, the ionic current increases. The effects of the MOF structure on enzyme activity and stability are also investigated. The HRP encapsulated in the MOF and modified inside the nanopore provides a novel and unlabeled design for studying enzymatic catalysis in a confined environment, which should have extensive applications in chemical-/bio-sensing, electrocatalysis, and fundamental electrochemistry.