Electrochemical conversion of nitrate, a widespread water pollutant, into high-value-added ammonia is a renewable and delocalized route to restore the globally perturbed nitrogen cycle. However, premature desorption of catalytic intermediates and the competitive reaction of hydrogen evolution make the current performance still far from suitable for practical applications. In this work, a Zr-based metal−organic framework (MOF) is in situ constructed at the reaction interface to serve as a smart channel for the highly selective electrocatalytic reduction of nitrate to ammonia. The secondary coordination interaction introduced by the pendant Brønsted acidic groups of MOF not only effectively stabilize the catalytic intermediates to facilitate the overall reaction process but also certainly increase the proton activation barrier to suppress the competing hydrogen evolution reaction. When coupled with a nanocluster active center, the proof-of-concept system achieves simultaneous improvement in three critical parameters, with a nitrate conversion rate of 97.6%, an ammonia selectivity of 95.2%, and a Faradaic efficiency of 91.4% at −1.0 V (vs RHE) under ultralow nitrate concentration conditions. This strategy provides an interesting route for the application of MOFs and paves the way for the removal of nitrate and its reduction to ammonia.