With the increasing demand of explosives, severe burden on the environment during their use and production is seriously growing. In particular, nitrate is a potential threat to water body, which will directly endanger human health. In this work, we put forward an interesting strategy for improving the electrochemical performance of nitrate reduction reaction (NO3RR) via tuning the phase of substrate MoS2 decorated by single boron atom, denoted as B@2H-MoS2 and B@1T-MoS2. By means of DFT calculations, it is found that B@1T-MoS2 has better NO3RR activity than B@2H-MoS2 because the former (0.39 V) has smaller limiting potential than the latter (0.61 V). Meanwhile, B@1T-MoS2 can effectively alleviate H poisoning and suppress the formation of byproducts. Additionally, the underlying regulation mechanism of the steric hindrance caused by structural phase change is to promote the electron redistribution. The excellent stability of B@1T-MoS2 featured with metastable basement was confirmed by migration energy barrier and ab initio molecular dynamics (AIMD) simulations. Our work may motivate the design of various electrodes beyond element screening and offer a valuable strategy for experimental synthesis.