The integration of molecular design with diamine modification generates synergistic effects for enhancing and fine tuning the molecular sieving potential of polyimide membranes. Polymer free volume and rigidity represent crucial conformational parameters that influence the effectiveness of diamine modification for elevating the H 2 /CO 2 permselectivity of polyimide membranes. Experimental and molecular dynamics simulation results suggest that polyimides with higher intrinsic free volume and rigidity are ideal for diamine treatment, yielding greater increment in H 2 /CO 2 selectivity. A series of copoly(4,4′-diphenyleneoxide/1,5-naphthalene-2,2′-bis(3,4-dicarboxylphenyl) hexafluoropropane diimide) (6FDA-ODA/NDA) membranes are modified with 1,3-diaminopropane (PDA). Polyimides with higher free volume intensify the methanol swelling effect which facilitates the transport and subsequent reaction of the diamine molecules. Gel content analyses of the PDA-modified films prove that the penetration depth of the diamine molecules and the extent of crosslinking are higher for polyimides with greater NDA content. 6FDA-NDA has the highest free volume and rigidity, thus exhibiting impressive improvement in ideal H 2 /CO 2 selectivity from 1.8 to 120 after PDA modification. Conversely, 6FDA-ODA which is deficient in terms of free volume and rigidity, demonstrates a much lower increment in H 2 /CO 2 selectivity from 2.5 to 8.2. The inherent heterogeneity of the PDA-modified polyimide films results in thickness-dependent gas permeability and selectivity. The potential of merging macromolecular tailoring with diamine networking to enhance the H 2 /CO 2 separation performance of polyimide membranes is evident.