The electrochemical urea oxidation reaction (UOR) to N 2 represents an efficient route to simultaneous nitrogen removal from N-enriched waste and production of renewable fuels at the cathode. However, the overoxidation of urea to NO x À usually dominates over its oxidation to N 2 at Ni(OH) 2 -based anodes. Furthermore, detailed reaction mechanisms of UOR remain unclear, hindering the rational catalyst design. We found that UOR to NO x À on Ni(OH) 2 is accompanied by the formation of near stoichiometric amount of cyanate (NCO À ), which enabled the elucidation of UOR mechanisms. Based on our experimental and computational findings, we show that the formation of NO x À and N 2 follows two distinct vacancy-dependent pathways. We also demonstrate that the reaction selectivity can be steered towards N 2 formation by altering the composition of the catalyst, e.g., doping the catalyst with copper (Ni 0.8 Cu 0.2 (OH) 2 ) increases the faradaic efficiency of N 2 from 30 % to 55 %.