In this study, a novel theory called Nanoscale Confinement Polarization Pinning (NCPP) theory is proposed. This theory provides theoretical support for the application of heterojunctions composed of porous metal-organic frameworks (MOFs) and conductors or semiconductors in enhancing the piezoelectric effect of piezoelectric polymers. The heterojunction formed between the metal-organic framework UIO-66(Hf)-NO2 and MoS2 enables the porous MOF to firmly pin the MoS2 onto the molecular chains of PVDF-HFP. During polarization, MoS2, being highly susceptible to the electric field, drives the movement of PVDF-HFP's molecular chains through UIO-66 (Hf)-NO2, this results in the molecular chains of PVDF-HFP aligning along the electric field, leading to a more orderly arrangement of the electric domains within PVDF-HFP and enhancing the piezoelectric effect, with the d33 value increasing from 8 pC N- 1 to 27 pC N- 1. The size of UIO-66(Hf)-NO2 is approximately 50 nm, with a conduction band of -0.93 eV and a bandgap of 2.56 eV, while MoS2 has a size of approximately 400 nm, a conduction band of -0.62 eV, and a bandgap of 1.27 eV. When MoS2 and UIO-66(Hf)-NO2 form a heterojunction, an interfacial electric field is generated at the junction, under the influence of this electric field, the PVDF-HFP molecular chains that penetrate into UIO-66(Hf)-NO2 tend to align, increasing the crystallinity of the composite nanofibers from 29.9 % to 35.0 %. This study broadens the application of heterojunctions formed by porous metal-organic frameworks with other conductors or semiconductors to enhance piezoelectricity, providing theoretical support.