Oxygen electrocatalysis, especially oxygen evolution reaction (OER), is a central process during the actual application of rechargeable metal-air battery. It is still challenging to develop ideal electrocatalysts to substitute the commercial noble metal-based materials. In this work, we have constructed a new material, CoP nanoparticles, which are encapsulated by a biomolecule-derived N, P-codoped carbon nanosheets via a simple and facile one-step strategy. The as-prepared material releases a high electrocatalytic activity and stability for OER, with an overpotential of 310 mV to achieve 10 mA/cm2 in 1 M KOH. Importantly, we found that the phosphoric acid can not only introduce phosphorus dopant into 2D N-doped carbon nanosheets and play a role of pore-forming agent, but also participate in the formation of active center (cobalt phosphide). Moreover, the coverage of N, P-doped carbon can prevent the CoP nanoparticles from corrosion under the harsh reaction medium to achieve high and stable activity. We believe that our strategy can offer a novel pathway to synthesize new transition metal-based catalysts for electrocatalysis or other heterogeneous catalysis.