Bismuth-based materials have attracted increasing attention in the research field of sodium/potassium-ion batteries owing to the high theoretical capacity. Unfortunately, the large volume variation and poor electrical conductivity limit their electrochemical performance and applications. Herein, we report a composite of heterostructured Bi2S3/MoS2 encapsulated in nitrogen-doped carbon shell (BMS@NC) obtained by a solvothermal reaction as a novel anode material for sodium/potassium-ion batteries. The coating of the carbon layer could effectively relieve structural strains stemmed from the large volume change and improve electrical conductivity. More importantly, by skillfully constructing the heterostructure, an internal electric field formed on the heterointerface provides a rapid diffusion of ion and charge. As a consequence, the BMS@NC composite showed an excellent electrochemical performance for both sodium-ion batteries (a capacity of 381.5 mA h g-1 achieved at a current density of 5.0 A g-1 and 412 mA h g-1 at 0.5 A g-1 after 400 cycles) and potassium-ion batteries (a high specific capacity of 382.8 mA h g-1 achieved after 100 cycles at 0.1 A g-1). The design of the Bi2S3/MoS2 heterostructure provides an effective strategy to develop energy storage materials with good electrochemical properties.