Fabricating COFs-based electrocatalysts with high stability and conductivity still remains a great challenge. Herein, 2D polyimide-linked phthalocyanine COF (denoted as NiPc-OH-COF) is constructed via solvothermal reaction between tetraanhydrides of 2,3,9,10,16,17,23,24-octacarboxyphthalocyaninato nickel(II) and 2,5-diamino-1,4-benzenediol (DB) with other two analogous 2D COFs (denoted as NiPc-OMe-COF and NiPc-H-COF) synthesized for reference. In comparison with NiPc-OMe-COF and NiPc-H-COF, NiPc-OH-COF exhibits enhanced stability, particularly in strong NaOH solvent and high conductivity of 1.5×10-3Sm-1 due to the incorporation of additional strong interlayer hydrogen bonding interaction between the O-H of DB and the hydroxy "O" atom of DB in adjacent layers. This in turn endows the NiPc-OH-COF electrode with ultrahigh CO2-to-CO faradaic efficiency (almost 100%) in a wide potential range from -0.7 to -1.1V versus reversible hydrogen electrode (RHE), a large partial CO current density of -39.2mAcm-2 at -1.1V versus RHE, and high turnover number as well as turnover frequency, amounting to 45000 and 0.76S-1 at -0.80V versus RHE during 12h lasting measurement.