A set of ionic liquid capped polyimide membranes was prepared using 1-aminoethyl-3-methylimidazolium hexafluorophosphate (IL1) and 1-aminopropylimidazolium bis(trifluoromethylsulfonyl)imine (IL2) as the terminal groups. The products’ molecular weights, mechanical properties, and separation permeability (CO2/CH4) were investigated. For CO2/CH4 separation, the selectivity of the ionic liquid capped polyimide membranes was higher than that of noncapped ones. Among them, the membrane synthesized by 4.4′- diaminodiphenyl ether and 4.4′-(hexafluoroisopropyl) diphthalic anhydride (6FDA) as monomer, with IL1 as terminal group, displayed the best selectivity. Its permeability was 7.47 Barrer and selectivity 102.42, which exceeded the 1991 Robeson curve. Polyimide membranes capped by ionic liquid showed high gas selectivity and good gas permeability as well as good physical and chemical properties. Consequently, it can be concluded that introducing an ionic liquid structure to polyimide chains could make attractive membrane materials for various gas separation and related applications.