Imines are important intermediates in drug synthesis. Photocatalytic aerobic oxidative coupling of amines has been considered as a clean and promising way to produce imines and has attracted great attention. Herein, we designed and synthesized a novel two‐dimensional porphyrin‐based covalent organic framework (Por‐BC‐COF) which adopts an AA stacking mode with excellent crystallinity, high Brunauer–Emmett–Teller surface areas (1200 m2 g−1), wide light absorption range (200–1300 nm) and good stability in a variety of organic solvents. Por‐BC‐COF can be used as a metal‐free heterogeneous photocatalyst for the photocatalytic oxidation of amines to imines under visible light and red light with a high yield (97 %). This work presents a novel and efficient COF photocatalyst in the application of light‐driven organic synthesis.