Covalent organic frameworks (COFs) are an emerging class of porous crystalline polymers with a wide variety of applications. They are currently synthesized through only a few chemical reactions, limiting the access and exploitation of new structures and properties. Here we report that the imidization reaction can be used to prepare a series of polyimide (PI) COFs with pore size as large as 42 × 53 Å(2), which is among the largest reported to date, and surface area as high as 2,346 m(2) g(-1), which exceeds that of all amorphous porous PIs and is among the highest reported for two-dimensional COFs. These PI COFs are thermally stable up to 530 °C. We also assemble a large dye molecule into a COF that shows sensitive temperature-dependent luminescent properties.