Maintaining structural stability and alleviating the intrinsic poor conductivity of conversion-type reaction anode materials are of great importance for practical application. Introducing void space and a highly conductive host to accommodate the volume changes and enhance the conductivity would be a smart design to achieve robust construction; effective electron and ion transportation, thus, lead to prolonged cycling life and excellent rate performance. Herein, uniform yolk–shell FeP@C nanoboxes (FeP@CNBs) with the inner FeP nanoparticles completely protected by a thin and self-supported carbon shell are synthesized through a phosphidation process with yolk–shell Fe 2 O 3 @CNBs as a precursor. The volumetric variation of the inner FeP nanoparticles during cycling is alleviated, and the FeP nanoparticles can expand without deforming the carbon shell, thanks to the internal void space of the unique yolk–shell structure, thus preserving the electrode microstructure. Furthermore, the presence of the highly conductive carbon shell enhances the conductivity of the whole electrode. Benefiting from the unique design of the yolk–shell structure, the FeP@CNBs manifests remarkable lithium/potassium storage performance.