Ammonia is essential for fertilizer production and attracts attention as a potential zero-carbon energy carrier. Despite this, its industrial synthesis remains dominated by the energy-intensive Haber-Bosch process, consuming massive amounts of fossil fuels and resulting in enormous carbon dioxide emissions. To overcome the environmental concerns, the electrochemical nitrogen reduction reaction (NRR) offers a promising alternative for sustainable ammonia production by leveraging excess renewable electricity as the driving energy. While the direct electrocatalytic approach in aqueous electrolytes faces challenges like sluggish kinetics and low faradaic efficiencies, lithium-mediated nitrogen reduction reaction (Li-NRR) in nonaqueous electrolytes has experimentally demonstrated feasibility and reliability for ammonia production. Nevertheless, limited fundamental understanding of Li-NRR chemistry, particularly the role of solid electrolyte interphase (SEI), hinders further improvements in industrial production. In this study, using electronic structure theory, we proposed a nitridation-coupled reduction mechanism and a nitrogen cycling reduction mechanism on lithium and lithium nitride surfaces, which are experimentally characterized as major components of SEI. Furthermore, a grand canonical approach was applied to simulate the microenvironments of SEI in realistic electrochemical conditions and to locate transition states for proposed reaction pathways. To further computationally characterize SEI, we employed DFT-based growth pathway analysis to explore possible nucleation mechanisms for inorganic lithium-containing layers on electrode surfaces. Our work provides critical chemical insights into Li-NRR, guiding future advancements toward sustainable ammonia electrosynthesis.