The electroreduction of nitrate to ammonia under ambient temperature and pressure driven by renewable energy provides an attractive green alternative for ammonia synthesis. However, it is difficult to selectively convert nitrate into ammonia without other side products for long-term stable operation. In this manuscript, atomically-dispersed Cu-N4 active sites anchored on zeolitic imidazolate frameworks with porous N-doped carbon (Cu-NC) were designed to promote Faraday efficiency (FE) and operational stability for the electrocatalytic conversion of nitrate to ammonia. Density functional theory calculations clarify that the adsorption of NO3– at the Cu-N4 site is thermodynamically favorable and the conversion of *NO to *N is the limiting step. Electron microscopy and X-ray absorption spectroscopy results reveal that Cu is uniformly distributed as individual atoms on N-doped carbon surfaces, while the coordination structure of Cu in Cu-NC catalyst is Cu-N4. The Cu-NC catalyst with excellent activity and stability increases the ammonia FE to 82.1 % at −0.89 V vs reversible hydrogen electrode (RHE) and yield rate to 4731.0 μg h−1 mgcat.-1 at −1.09 V vs RHE, respectively.