The continuous increase in atmospheric carbon dioxide (CO
2) concentration has created an urgent demand for efficient carbon capture, utilization and storage (CCUS). Although CO
2 has been injected into deep saline aquifers and oil and gas reservoirs for geological storage and enhanced oil recovery (EOR), the limited interfacial adsorption capacity and pore-surface active sites of natural reservoir rocks mean that CO
2 still faces risks of migration and leakage during long-term injection. To address this issue, this study proposes the in situ growth of metal-organic framework (MOF) nanocrystals, specifically zeolitic imidazolate framework-8 (ZIF-8), within natural rock (Berea sandstone, BS), thereby constructing ZIF-8/BS composite porous media with both the structural stability of the natural rock framework and microporous adsorption functionality. Morphological and phase analyses show that ZIF-8 achieves uniform loading on the BS surface while maintaining an intact crystal structure. CO
2 adsorption, N
2 adsorption, mercury intrusion porosimetry (MIP), and
T2-
T2 relaxation exchange results show that the introduction of ZIF-8 enables BS to form a multiscale pore structure composed of micropores, mesopores, and macropores. The in situ grown ZIF-8 mainly modifies the pore-surface interfacial characteristics and introduces a micropore contribution, without weakening the connectivity of the original BS pore network, and increases the specific surface area from 1.8197 m
2 g
-1 to 25.4238 m
2 g
-1. At 298 K and 100 kPa, the CO
2 uptake of ZIF-8/BS reaches 22.21 cm
3 g
-1 STP, which is significantly higher than that of BS, 0.15 cm
3 g
-1 STP, and remains stable after multiple adsorption-desorption cycles. In addition, supercritical CO
2 (sc-CO
2)-water/oil displacement experiments under online nuclear magnetic resonance (NMR) monitoring show that ZIF-8/BS exhibits improved residual-fluid migration capability and displacement efficiency during both water-phase and oil-phase displacement. Compared with BS, the residual water saturation of ZIF-8/BS decreases from 43.18% to 32.34%, and the water-displacement efficiency increases from 56.82% to 67.66%; the residual oil saturation decreases from 37.49% to 28.69%, and the oil-displacement efficiency increases from 62.51% to 71.31%, indicating that ZIF-8/BS can effectively reduce pore-wall residual fluids constrained by surface forces. Overall, the in situ introduction of an MOF functional phase into natural rock pores can achieve the coupled enhancement of CO
2 adsorption and displacement performance while maintaining the connectivity of the main pore network, providing a new research strategy for reservoir pore-interface functionalization during CO
2-EOR and CO
2 geological storage.