Three-dimensional foam with integrated core-shell carbon nanotubes-MoS2 with reduced graphene oxide (MoS2/CNT/rGO) has been fabricated by a hydrothermal reaction together with freeze drying. Thin MoS2 nanosheets are coated on the carbon nanotubes (CNT) and distributed on the surface of reduced graphene oxide (rGO) nanosheets. One-dimensional CNT and two-dimensional rGO conductive network not only effectively improves the electron transport and mechanical property, but also prevents the aggregation of MoS2 nanosheets. MoS2 with large interlayer spacing provides more active sites and channels for insertion of lithium ions, while CNT and rGO network acts as a conductive skeleton. The 3D porous and interconnected foam can directly as electrode without any binders and conductive agents. After optimizing the ratio of CNT to rGO, the MoS2/CNT/rGO foam as a freestanding electrode for lithium ion batteries exhibits a high specific capacity of 745 mAh g−1 at a current density of 0.1 A g−1 after 170 cycles and 420 mAh g−1 at 0.5 A g−1 after 200 cycles. This method is easily extended to prepare the other electrode materials, especially the freestanding and flexible electrode.