Polyimides (PIs) are widely employed as gas-separation membranes because of their thermal stability and chemical resistance. Incorporating polar functionalities can enhance interchain interactions and regulate chain packing, improving ideal selectivity. Here, a hydroxyl-functionalized PI was synthesized from a hydroxyl-functionalized dianhydride and a selected diamine via step-growth polycondensation, and dense films were prepared. The structures of the monomers and the resulting PI were confirmed by NMR and FT-IR, and thermal properties were assessed by DSC and TGA. Chain packing was examined by X-ray diffraction (XRD) through analysis of shifts in the amorphous halo and the derived d-spacing (average interchain distance). Gas transport was evaluated in terms of permeability and ideal selectivity (e.g., H₂/N₂). The results provide structure–property insights for hydroxyl-enabled packing control and PI membrane design for energy-efficient hydrogen purification.