• Three novel covalent organic frameworks (COFs) composed of nickel phthalocyanine units and different linkages, including dioxin, piperazine, and dithiine, were successfully constructed.
• It was found that only a single-point structural variation of the linkage in the COFs could effectively modulate their performance in CO2 reduction reaction, where the piperazine-linked COF achieved a pretty high Faradaic efficiency for CO of 90.7% at a critically low overpotential of 0.39 V.
• Theoretical calculations indicated that the COF with dioxin linkage stabilized the *COOH intermediate more effectively than the other two NiPc-based COFs.
• The piperazine-linked COF exhibited both high selectivity (FECO close to 100%) and reasonable current density (−8.20 mA cm–2 at −0.8 V vs RHE), making it a competitive candidate among COF-based materials.