To solve the agglomeration of Fe and low electronic conductivity of FeP anode, a simple route through metal organic framework (MOF)-derived phosphorization has been successfully explored for in-situ encapsulation of FeP nanoparticles in porous carbon framework (FeP@C). The MOF-derived FeP@C anode can substantially inhibit the coarsening of small Fe, improve the electroconductivity and moderate the volume expansion of electrode, leading to superior rate capability and excellent cycling performance for Li-, Na- and K-ions storage. For example, the FeP@C anode delivers a high reversible capacity of 700 mAh g−1 at 0.1 A g−1 over 180 cycles for Li-ion batteries, displays a high reversible capacity of 387 mAh g−1 at 0.1 A g−1 over 100 cycles for Na-ion batteries and achieve a high reversible capacity of 163 mAh g−1 at 0.2 A g−1 over 100 cycles for K-ion batteries. The kinetic analysis, calculated diffusion coefficient and partial density of states (PDOS) results also confirmed this in-situ carbon encapsulated strategy improves the conductivity of FeP particles facilitating the alkali-ion/electron's transportation.