The production of ammonia (NH3) from nitrogen sources involves competitive adsorption of different intermediates and multiple electron and proton transfers, presenting grand challenges in catalyst design. In nature nitrogenases reduce dinitrogen to NH3 using two component proteins, in which electrons and protons are delivered from Fe protein to the active site in MoFe protein for transfer to the bound N2. We draw inspiration from this structural enzymology, and design a two-component metal-sulfur-carbon (M-S-C) catalyst composed of sulfur-doped carbon-supported ruthenium (Ru) single atoms (SAs) and nanoparticles (NPs) for the electrochemical reduction of nitrate (NO3-) to NH3. The catalyst demonstrates a remarkable NH3 yield rate of ~37 mg L-1 h-1 and a Faradaic efficiency of ~97% for over 200 hours, outperforming those consisting solely of SAs or NPs, and even surpassing most reported electrocatalysts. Our experimental and theoretical investigations reveal the critical role of Ru SAs with the coordination of S in promoting the formation of the HONO intermediate and the subsequent reduction reaction over the NP-surface nearby. This study proves a better understanding of how M-S-Cs act as a synthetic nitrogenase mimic during ammonia synthesis, and contributes to the future mechanism-based catalyst design.