Non-noble metal-based heteroatom compounds demonstrate excellent electrocatalytic activity for the oxygen evolution reaction (OER). However, the origin of this activity, driven by structure evolution effects, remains unclear due to the lack of effective in situ/operando techniques. Herein, we employ the operando quick-scan x-ray absorption fine structure (Q-XAFS) technique coupled with in situ controlled electrochemical potential to establish a structure-activity correlation of the OER catalyst. Using Ni-Fe bimetallic phosphides as a model catalyst, operando Q-XAFS experiments reveal that the structural transformation initiates at the preferential oxidation of Fe sites over Ni sites. The in situ–generated O-Fe-P structure serves as the origin of the enhanced electrocatalytic OER activity of the catalyst, a finding supported by theoretical calculations. This work provides crucial insights into understanding the reaction mechanism of the state-of-the-art Ni-Fe–based OER electrocatalysts, thus advancing the rational design of more efficient OER electrocatalysts.