Electrocatalytic nitrate (NO3−) reduction to synthesize ammonia (NH3) is a potential green and sustainable route that could remove NO3− pollutants from industrial and domestic wastewater. Herein, a catalyst with a sea-urchin-like structure grown on porous nickel foam is prepared for the electrocatalytic nitrate reduction reaction. It shows a high Faradaic efficiency of 97.7% at −0.45 V and an NH3 yield rate of 246.5 μmol h−1 cm−2 at −0.65 V in 0.1 M NaOH aqueous solution with 500 ppm NO3−. Density functional theory calculations demonstrate that the catalytic performance can be attributed to good electronic conductivity, with a calculated band gap of 0.72 eV, which facilitates the selective conversion to NH3. This work not only provides a catalyst for the electrocatalytic nitrate reduction reaction but also points out a green method to design electrocatalytic nitrate reduction reaction catalysts for practical applications.