Electrocatalytic NO3- reduction reaction (NO3-RR) is of great significance in pollution treatment and energy conversion, and its core problem is how to realize rapid electron transfer and easy-to-adjust electronic structure to meet the needs of eight-electron nine-proton reaction. Vacancy engineering is considered as reasonable strategy to optimize the electronic structure, accelerate the kinetic process. Therefore, based on the strategy of doping-oxygen to induce the generation of phosphorus vacancy, heterogeneous bimetallic phosphide CoP-Ni2P with controllable phosphorus vacancy was successfully constructed. Theoretical calculations show that the introduction of phosphorus vacancy moves the potential determining step of NO3-RR forward, which promotes the kinetic of the reaction. So, the conversion, Faraday efficiency and selectivity of catalyst are significantly improved. Furthermore, Zn-NO3- battery exhibited power density of 1.05 mW cm−2. This work has realized pollution treatment and energy conversion in electrocatalysis system and Zn-NO3- battery system, enriched the application of vacancy engineering in this field.