We demonstrate that active site ensembles on transition metal phosphides tune the selectivity of the nitrate reduction reaction. Using Ni2P nanocrystals as a case study, we report a mechanism involving competitive co-adsorption of H* and NOx* intermediates. A near 100% faradaic efficiency for nitrate reduction over hydrogen evolution is observed at -0.4 V, while NH3 selectivity is maximized at -0.2 V vs. RHE.