Tin phosphide (Sn4P3) nanoparticles with different sizes are synthesized via a facile solvothermal method at 180 °C for 10 h. The as-prepared Sn4P3 nanoparticles have an average size of about 15 nm. Meanwhile, their size could be easily controlled by the solvent ratio. The long cycle stability and rate performance of the as-obtained Sn4P3 nanoparticles have been tested as an anode material for lithium ion batteries for the first time. Electrochemical measurements show that the Sn4P3 nanoparticles with a smallest size give the best cycling and rate performances. They deliver a discharge capacity of 612 mAh g−1 after 10 cycles and could still maintain 442 mAh g−1 after 320 cycles at the current density of 100 mA g−1 within voltage limit of 0.01–3.0 V. Even after 200 cycles at a current density of 200 mA g−1, the specific capacity still could be remained at 315 mAh g−1. The improved electrochemical performances of Sn4P3 electrode might be largely attributed to their small-size. Furthermore, the as-prepared Sn4P3 nanoparticles have also been tested as an anode material for Na-ion batteries, this Sn4P3 anode can deliver a reversible capacity of 305 mAh g−1 after 10 cycles at the current density of 50 mA g−1.