Herein, p-ferrocenylaniline (CPFEA) is first synthesized from p-nitroaniline and ferrocene as raw materials. Then, a series of Fe-doped rearrangeable polyimide (PI) membranes are prepared by polymerizing 4,4′-(hexafluoroisopropylidene)dithiocarboxylic anhydride (6FDA) and 2,2′-bis(3-amino-4-hydroxyphenyl)hexafluoropropane (6FAP), with CPFEA as an end-capper, followed by thermal imidization and thermal rearrangement (TR) treatment. During the heating process, Fe2+ undergoes a valence state transition, ultimately leading to the coexistence of Fe2+ and Fe3+. The experimental results show that as the CPFEA content increases, the mechanical properties of the Fe-doped PI membranes gradually decrease, but the glass transition temperatures significantly increase due to the chelation of iron ions. In addition, owing to the synergistic effect of Fe2+/Fe3+ on thermal rearrangement reactions and intermolecular interactions, the gas permeabilities and selectivities of the TR composite membranes are greatly improved. Among them, the TR-1.0 %CPFEA sample exhibits the gas permeabilities of 2727, 2442, 407, 107, and 118 Barrer for CO2, H2, O2, N2, and CH4, and the separation performance of CO2/N2 is close to the 2008 Robeson upper limit, the CO2/CH4 exceeds the 2008 Robeson upper limit. When the thermal treatment temperature reaches 500 °C, the gas permeabilities to CO2, H2, O2, N2, and CH4 are respectively boosted to 30591, 13146, 5958, 1714, and 1882 Barrer, and the CO2/CH4 separation performance exceeds the 2019 upper limit. Therefore, this work proposes a feasible method to boost the gas separation performance by end-capping PI backbones with CPFEA, and the Fe-doped TR composite membranes are expected to play a certain role in the environmental and industrial fields.