The exploration of promising anode materials with high capacity represent great challenge for LIBs and SIBs. Zinc sulfide (ZnS), has attracted more attention owing to its high capacity and abundant resource. However, the poor cycle performance have seriously hinder the practical application, which induced by the seriously volume expansion during the lithiation process. In this work, in-situ growth of the ZnS nanoparticles (NPs) on 3D N-doped carbon architecture (ZnS/NC) have been prepared by a simple method. In such a architecture, the N-doped carbon can not only avoid the volume change of ZnS, but also much improve the conductivity of hybrids, as well as facilitate a fast ions/electrons transport. As a result, the ZnS/NC composite exhibits outstanding cycle performance (377.1 mAh g−1 after 400 cycles at 1.0 A g−1) and outstanding rate performance (404 mA h g−1 at 3 A g−1) for LIBs. As for SIBs, a high reversible capacity of 244.1 mAh g−1 is obtained after 900 cycles at 1.0 A g−1, and high even at 3.0 A g−1, high reversible capacity of 241 mAh g−1 is also achieved, demonstrating excellent cycling performance and rate performance.