Electrocatalyst is a key component to applications of electrochemistry in energy and environment. Metal oxides/ oxyhydroxides are promising electrocatalysts beyond metals which have been mainly used as electocatalysts but suffered from its intrinsic limitation in the optimization of performance. However, atomistic understanding of electrochmical reactions on metal oxides/oxyhydroxides have not been studied extensively because some metal oxides/oxyhydroxides feature localized unpaired spins and thus demand theory beyond the standard density functional approximations. Here, we apply a state-ofthe-art theoretical method, using the hybrid functional and explicit constant electrochemical potential calculations to unravel the atomistic mechanism underlying the optimal performance of nickel oxyhydroxide based catalysts for oxygen evolution reaction (OER). This predicts dramatic improvement in performance of the nickel oxyhydroxide based catalysts for OER and also suggests a strategy to accurately describe the electrochemical processes as a function of explicit chemical potential.