Electrocatalytic reduction represents an effective approach for the conversion of the harmful gas nitric oxide (NO) into ammonia (NH3), a vital chemical precursor in industrial production. However, the large-scale practical application of NO electrocatalytic reduction remains a significant challenge, particularly in the identification of efficient, low-cost, and stable catalysts. In this study, we investigate the electronic structure, magnetic properties, and stability of the Fe-MoS2 doping system using first-principles calculations. We explore the activation mechanism of NO molecules by Fe-MoS2 and assess its potential as an electrocatalyst for NO reduction by examining the electronic structure of the adsorbed states. Our results show that Fe doping effectively modulates the electronic structure of MoS2, significantly enhancing its capacity to adsorb NO compared to pristine molybdenum disulfide surfaces. Analysis of charge transfer and electronic properties during NO adsorption reveals a charge transfer of 0.32e between the substrate and the adsorbed NO molecule. Furthermore, the 2py and 2px orbitals of the nitrogen atom exhibit partial overlap with the 3dxy, 3dyz, and 3dxz orbitals of the Fe atom near the Fermi level, indicating strong interactions that facilitate NO activation. The hydrogenation process of NO to ammonia was further investigated using two different approaches. The results demonstrated the exceptional electrocatalytic reduction activity of Fe-doped S vacancy towards NO. This study not only provides a concise depiction of the Fe-MoS2 electrocatalyst but also verifies the feasibility of utilizing Fe-MoS2 for the electrocatalytic synthesis of ammonia from NO.