beta-ketoenamine-based COFs are widely investigated due to their high stability, good crystallinity and tunable skeleton structures. Nitrogen doping is one of the effective ways to enhance the catalytic activity of COFs. Herein, N-doping of beta-ketoenamine-based (0N-TP-COF, 1N-TP-COF, 2N-TP-COF) COFs were successfully constructed by the Schiff base condensation reaction between 1,3,5-tiformylphloroglucinol (TP) and p-phenylenediamine containing different numbers of nitrogen atoms. Studies showed that the as-prepared COFs exhibited more suitable electronic structure and more electron-rich active sites with the increasing of N atoms. Furthermore, the photocatalytic performance of 4-formylphenylboronic acid transformation was 0N-TP-COF (99 %, 48 h) < 1N-TP-COF (99 %, 32 h) < 2N-TP-COF (99 %, 16 h), and the photocatalytic performance of benzylamine coupling was 0N-TP-COF (99 %, 16 h) < 1N-TP-COF (99 %, 3.5 h) <2N-TP-COF (99 %, 1.5 h), respectively. Note that all N-doping COFs have excellent catalytic activity as well as stability, and 2N-TP-COF exhibits the highest catalytic activity. This work demonstrates that doping of nitrogen atoms is an effective way to enhance photocatalytic performance.