Transition metal phosphides (TMPs) with high theoretical capacities and safe operating voltage are recognized as prospective anode materials for lithium-ion batteries (LIBs). While, the huge volume expansion and low conductivity of TMPs still restrict their applications. Engineering nanostructured composites consisting of TMPs and conductive carbon-based materials is of great importance to improve electrochemical performance. Herein, a novel and facile pyrolysis-oxidation-phosphidation approach is designed to fabricate porous nanospheres composing of CoP nanoparticles and N-doped carbon substrate. The abundant pores in CoP/N-C provide ample active sites for lithium storage and facilitate Li+ transport. The introduction of N-doped carbon substrate enhances the electrical conductivity, allowing CoP to maintain its structure during cycling. The CoP/N-C anode achieves remarkable cycle performance, maintaining an extremely stable cycle life over 2000 cycles at 5 A g−1. More importantly, the full cell consisting of CoP/N-C and LiFePO4 also exhibits a prominent cycling durability with a capacity retention of 96.5 % at 0.1 A g−1 after 150 cycles. This work proposes a simple and feasible structural engineering strategy, which can provide a new way for optimizing the electrochemical performance of conversion-type anode materials.