Electrocatalytic nitrate reduction enables the recovery of nitrate from water under mild conditions and generates ammonia for nitrogen fertilizer feedstock in an economical and green means. In this paper, Co/biomass carbon (Co/BC) composite catalysts were prepared by co-carbonization of straw and metal–organic framework material ZIF-67 for electrocatalytic nitrate reduction using hydrothermal and annealing methods. The metal–organic framework structure disperses the catalyst components well and provides a wider specific surface area, which is conducive to the adsorption of nitrate and the provision of more reactive active sites. The introduction of biomass carbon additionally enhances the electrical conductivity of the catalyst and facilitates electron transport. After electrochemical testing, Co/BC-100 exhibited the best performance in electrocatalytic nitrate reduction to ammonia, with an ammonia yield of 3588.92 mmol gcat.−1 h−1 and faradaic efficiency of 97.01% at −0.5 V vs. RHE potential. This study provides a promising approach for the construction of other efficient cobalt-based electrocatalysts.