For the first time, a theoretical analysis of gas sorption, based on the nonequilibrium lattice fluid (NELF) model, in chemically imidized HAB-6FDA polyimide and its thermally rearranged analogues is presented. Because of the inaccessibility of pVT data in the rubbery region, the characteristic lattice fluid parameters of the polymers considered in this study were obtained from a collection of infinite dilution solubility data at multiple temperatures. Hydrogen, nitrogen, and methane sorption isotherms at 35 °C were fit to the NELF model using one adjustable parameter, i.e., the polymer-penetrant binary interaction parameter, k12. The optimal value of k12 for each polymer-penetrant pair was used to predict hydrogen, nitrogen, and methane sorption isotherms at other temperatures and at pressures up to 6 MPa. For carbon dioxide, a second adjustable parameter, the swelling coefficient, was introduced to account for sorption-induced matrix dilation. The ideal solubility-selectivity is also predicted for several gas pairs. The increase in gas sorption in thermally rearranged samples relative to their polyimide precursor is essentially due to entropic effects, i.e., to the increase in nonequilibrium fractional free volume during thermal rearrangement.