Effective separation of CO2 from CH4 is crucial for the purification of natural gas, which requires membrane materials with high permeability, selectivity, and stability of under high pressures. In this work, a high CO2-affinity MOF-based nanofiller (Pin@NH2-UiO-66) was prepared and integrated in polyetherimide (PEI) to prepare mixed matrix membranes (MMMs) for enhanced CO2/CH4 separation capabilities. The Pin@NH2-UiO-66 nanofiller comprised an in situ-formed polyethyleneimine-NH2-UiO-66 composite prepared via a one-pot synthesis. The polyethyleneimine was covalently attached to the H2BDC-NH2 ligand allowing for a stronger integration within the PEI matrix. The polyethyleneimine affects the nucleation of MOF, leading to miniaturization of the MOF particles. The smaller-sized filler is beneficial for improved interaction at the filler-matrix interface. The numerous amino functionalities grafted onto the NH2-UiO-66 increased the CO2 adsorption sites, thereby enhancing the affinity for CO2. Owing to the improved interaction, the elevated CO2 attraction, and the inherent properties of the porous NH2-UiO-66, the fabricated MMMs preformed superior in separating CO2/CH4. The 30-Pin@NH2-UiO-66-PEI membrane (containing 30 wt% nanofiller) exhibited a CO2/CH4 selectivity of 27.7 and a CO2 permeability of 2498.9 Barrer. The CO2 permeability was 21 times greater than that of the pristine PEI membrane, and 4 times higher compared to P@NH2-UiO-66 MMM with polyethyleneimine modified MOF filler prepared by a traditional wet impregnation method. Additionally, the novel MMM demonstrates excellent separation stability under conditions that mimic industrial settings, demonstrating its potential application for natural gas purification.