The development of sustainable and effective electrochemical nitrogen fixation catalysts is crucial for the mitigation of the terrible energy consumption resulting from the Haber-Bosch process. Molybdenum disulfide (MoS2) exhibits promise toward nitrogen reduction reaction (NRR) on account of its similar structure to natural nitrogenases MoFe-co but still undergoes serious challenges with unsatisfactory catalytic performance resulted from limited active sites, conductivity, and selectivity. In this work, Fe/Co/B codoped MoS2 ultrathin nanosheets are synthesized and verified as excellent NRR catalysts with high activity, selectivity, and durability. The FeCoB-MoS2 demonstrates a high ammonia yield of 36.99 μg h-1 mgcat-1 at -0.15 V vs RHE and Faraday efficiency (FE) of 30.65% at -0.10 V vs RHE in 0.1 M HCl. The experimental results and the density functional theory (DFT) calculations emphasize that codoping of Fe, Co, and B into MoS2 synergistically enhances its conductivity and optimizes the electronic structure of the catalyst, which significantly improves the electrocatalytic ammonia synthesis performance. This work broadens the potential and enlightens the strategy for designing efficient electrocatalysts in the NRR field.