Free-standing and binder-free electrodes of carbon cloth uniformly covered with Cu2NiSnS4 nanospheres are synthesized via a facile surfactant-assisted hydrothermal method combined with post annealing treatment. The flexible composites are directly applied as electrodes for lithium ion batteries (LIBs) and sodium ion batteries (SIBs). The as-prepared electrodes display outstanding electrochemical performance. They deliver high reversible capacities of 1537 and 329 mAh g−1 after 150 cycles at a current density of 0.1 A g−1 for LIBs and SIBs, respectively. Even when the current density increases to 2 A g−1, the specific capacity remains at 1200 mAh g−1 for LIBs. Benefiting from the intrinsic nature of materials, structure features, and good electrochemical performance, the as-prepared flexible electrode can be utilized for flexible energy storage devices.