A novel dianhydride 3,3’-bis(3,4-dicarboxyphenoxy)-4,4’-diphenylethynyl biphenyl dianhydride (BPEBPDA) and a new tetramine monomer 5,10,15,20- tetra[4-[(3-aminophenyl)ethynyl]phenyl]porphyrin (TAPEPP) were successfully synthesized. Porphyrin-based polyimides (PPBPIs) were synthesized from BPEBPDA and porphyrin-based building blocks (TAPP and TAPEPP) via polymerization reactions. The porphyrin-based porous polyimide networks (PPBPI-CRs) were obtained from PPBPIs through thermal crosslinking reactions. The PPBPI-CRs exhibited BET surface areas (682 m2 g−1 and 693 m2 g−1) and CO2 uptakes (2.0 mmol g−1 and 1.67 mmol g−1 at 273 K and 1 bar) as well as the separation factors of CO2/N2 (37.63, 28.97) and CO2/CH4 (7.51, 5.61). Meanwhile, PPBPI-CRs showed an enhanced CO2 isosteric enthalpies of adsorption (25.1 kJ mol−1 and 30.1 kJ mol−1) than other porous polymers.