Sn–Co alloy films are deposited electrochemically directly onto nickel foam in an aqueous solution. The influence of electrochemical current density and heat treatment on the structure and morphology of the electrodeposited films is studied by X-ray diffraction (XRD) and scanning electron microscopy (SEM). The electrochemical properties of the Sn–Co alloy films are further investigated by galvanostatic charge–discharge tests. As anodes for lithium ion batteries, the Sn–Co alloy-film anodes, after further heat treatment at 200°C for 30min, delivers a specific capacity of 663mAhg−1 after 60 cycles. This high capacity retention is attributed to the unique electrode configuration with an enhanced interface strength between the active material and the current collector formed in the heat-treatment process.