Porous tin-based films are electrodeposited on copper foils from a choline chloride/ethylene glycol based electrolyte containing SnCl2·2H2O without any complexing agent or additive. Increasing the deposition time and voltage produces thicker films. The initially deposited Sn grains are relatively uniform with an average size of 200–300 nm and a kind of self-assembly distribution constructing an open and bicontinuous porous network. The architecture of these films possesses a double-layer structure, i.e. SnO2 (superficial layer)/Sn–Cu alloy (bottom layer), which is revealed by X-ray diffractometer and X-ray photoelectron spectroscopy. The electrochemical performance of the porous tin-based films as anode for lithium-ion batteries is measured. Although the capacity fades gradually with repeated cycling, a reversible capacity of 300-350 mAh g−1 is maintained for more than 50 cycles, which suggests that the in situ formed Sn--Cu alloy could provide an interlocking interface between active materials and current collector. Therefore, the tin's shedding from the current collector can be restrained. Moreover, the inactive materials, such as the oxide in the superficial layer and the Cu in the bottom layer, could also act as buffers to relieve the induced volume expansion of Sn during the repeated lithiathion/delithiation process, thus giving the good cycle performances.