Molybdenum disulfide (MoS2), employed for rechargeable sodium-ion batteries (SIBs) as an anode material, has attracted considerable attention attributing to its high Na+ intercalation capability. Nevertheless, MoS2 suffers from low conductivity and large volume expansion upon the discharging/charging. In this work, MoS2 nanoflakes were dispersed into a three-dimensional (3D) porous carbon framework by utilizing salt as hard template, obtaining a 3D porous MoS2/carbon composite. When employed as an anode material for SIBs, the composite shows large specific capacity, good rate capability and cycling stability. A large capacity of 361 mAh g−1 is achieved at 5.0 A g−1 and a capacity of 372 mAh g−1 is still well maintained at 0.5 A g−1 after 200 cycles. The 3D interconnected porous carbon framework is believed to improve the electrochemical performance through accelerating the transportation of electrons and ions, as well as suppressing the volume expansion upon the Na+ insertion and preventing the active materials aggregation.