Two-dimensional (2D) covalent organic frameworks (COFs) with metal centers are ideal template to construct electrrocatalysts due to their high degree of structural controllability. However, the metal centers were stacked in column with limited space, which impeded mass delivered to catalytic sites across the pore channels. Herein, we have first demonstrated topologic synthesis strategy to construct catalytic sites in three-dimensional (3D) direction. The designed 3D COF adopted ffc topology, with large space of 1.15 and 1.53 nm between the metal sites along parallel and vertical directions, respectively. The in-situ spectroscopies revealed 100% Ni-N4 sites in 3D frameworks have reconstructed to Ni N4-NO, while the reconstruction proportion of Ni-N4 sites was 40% for 2D COF (with a distance between metal sites of 0.38 nm). The catalytic 3D COF enable to electrochemical synthesize of NH3 via reduction of nitrate (NO3RR) with a rate of 9.51 mg mgcat−1 h−1, 140% of that from the 2D catalytic at −0.7 V vs RHE. The theoretical calculation further revealed the reconstructed Ni N4-NO site had a stronger binding ability of the reactants and intermediates than that of the initial Ni-N4 site, and thus contributed to higher activity. This work provides general design strategies for heterogeneous catalysts in electrocatalytic systems.