Ternary metal Prussian blue analogue nanoparticles were applied as cathode materials for Li-ion batteries. Heterometal substitution suppressed phase separation induced by over-lithiation, leading to both a long cycle life and a high rate capability.