Electricity-driven nitrate (NO3−) to ammonia (NH3) conversion presents a unique opportunity to simultaneously eliminate nitrate from sewage while capturing ammonia. However, the Faradaic efficiency and ammonia yield in this eight-electron process remain unsatisfactory, underscoring the critical need for more effective electrocatalysts. In this study, a RuCo alloy nanosheets electrodeposited on pinewood-derived three-dimensional porous carbon (RuCo@TDC) is introduced as a highly-efficient electrocatalyst for the nitrate reduction reaction. The RuCo@TDC catalyst exhibits superior electrocatalytic performance, achieving the highest NH3 yield of 2.02 ± 0.11 mmol h−1 cm−2 at −0.6 V versus the reversible hydrogen electrode (vs. RHE) and the highest Faradaic efficiency of 95.7 ± 0.8 % at −0.2 V vs. RHE in an electrolyte mixture of 0.1 M KOH and 0.1 M KNO3. Furthermore, the Zn-NO3− battery using RuCo@TDC as the cathode provides a maximum power density of 2.46 mW cm−2 and a satisfactory NH3 yield of 1110 μg h−1 cm−2.