The nitrate reduction reaction (NO3RR) is a promising technology for simultaneous treatment of NO3- wastewater and synthetic ammonia. However, the NO3RR involves multiple electron and proton transfer processes, and the ammonia selectivity and yield are highly susceptible to the evolution of key intermediate (*NO2) and the competing hydrogen evolution reaction (HER). In this study, bismuth (Bi), with a high hydrogen overpotential, is used as an inhibitor of the HER. Meanwhile, the Bi doping CoS2 (Bi-CoS2) can refine the d-band center of CoS2, which optimizes the adsorption of *NO2, reduces the accumulation of NO2- on the surface of the catalyst and then releases more active sites, thereby enhancing the NO3RR activity. This viewpoint is verified by experimental results, density functional theory (DFT) calculations and in situ Raman. Benefitting from the dual roles of Bi, Bi-CoS2 exhibits a highest NH3 Faraday Faradaic efficiency (FE) of 87.18%, an ammonia yield rate of 944.64 μg h-1 cm-1 and long-term stability at -0.2 V versus the reversible hydrogen electrode (RHE). Furthermore, an assembled Zn-NO3- battery can reach a maximum power density of 16.3 mW cm-2 and high FENH3 of 95.76%, providing a high-efficiency multifunctional system for nitrate to ammonia and energy conversion.