The discovery of extremely effective heteroatom dopant catalysts for electrochemical reduction reactions is crucial for ambient nitrogen fixation. In this paper, we investigated nitrogen and boron doped biomass carbon as an effective electrocatalyst for nitrogen reduction reaction (NRR), where the N, B content ratio, and pyrolysis temperature were optimized to improve N 2 adsorption and N≡N cleavage. The resulting 600ACNB‐213 exhibits outstanding improvement in fixing N 2 to ammonia with a high ammonia production rate (41 μg h −1 mg −1 at −1 V vs. RHE), outperforming other metals and carbon‐based materials and even being superior to noble‐metal‐based catalysts. Besides, there indicates good stability through six cycles of testing. Experiments and analyses demonstrated that pyridinic‐N and BC 2 O were active sites for ammonia synthesis and that their contents' ratio was critical for enhancing ammonia production on N, B doped carbon. These sites can enhance step‐by‐step catalytic reactions through rapid electron transfer processes by strengthening the conductivity of carbon‐based materials with dopants, substantially improving the overall catalytic performance. This research suggests that designing carbon co‐doped with N, B for effective N 2 reduction electrocatalysts has a significant potential.