The Sn-based intermetallic compounds possess a high specific energy density, but their most important challenge to be used as anodes in lithium ion batteries consists in the mechanical fatigue caused by volume change during lithium intercalation and extraction processes. The current paper presents a facile procedure to prepare macroporous Sn–Co alloy film electrode through a colloidal crystal template method together with electroplating on a Ni-coated Cu sheet substrate. The structure and electrochemical properties of the macroporous Sn–Co alloy films were examined by scanning electron microscopy (SEM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), and galvanostatic cycling. The results illustrated that the macroporous Sn–Co alloy film electrode can deliver a reversible capacity as high as 610mAhg−1 up to 75th cycle. In comparison with the Sn–Co alloy film directly deposited on Ni-coated Cu sheet substrate, the macroporous structure of the Sn–Co alloy electrode prepared by the present procedure has enhanced significantly the capacity and the cyclic performance. It has demonstrated that the macroporous structure has played an important role, in addition to the alloying effect, to overcome the effect of volume expansion during charge/discharge cycling of Sn-based alloy anodes.