Three-dimensional (3D) porous amorphous SnO2 thin films were deposited on Ni foam substrates by Electrostatic Spray Deposition (ESD) technique as anodes for Li-ion batteries. These films display good capacity retention of 94.8% after 100 cycles at 0.5C and rate capability of 362mAh/g at 10C. The improved performance originates from the fact that the 3D porous structure offers a “buffer zone” to accommodate the large volume change during cycling, and the foam-like substrate maximizes the contact area between electrode and electrolyte. The facile ESD method can be potentially extended to prepare other 3D porous functional materials.