Room-temperature sodium-sulfur (RT Na–S) batteries have been getting increasing attention in the field of energy storage system thanks to their advantages of high specific capacity, good safety, low cost and environmental friendliness. However, limited by the low conductivity, large volume change and complex reaction, the utilization rate of active sulfur is still unacceptable, which delays the practical application of RT Na–S battery. Herein, derived from CoZn-ZIFs, a cobalt, nitrogen co-doped microporous carbon matrix (Co,N-MPC) has been devised to exploit capacity of active sulfur as fully as possible. In the case of appropriate Co content, the affluent micropores limit the size of sulfur and inhibit the volume change. And the well-dispersed Co and N elements improve the adsorption of the matrix to sulfur species and promote their transformation process. Owing to their synergistic effect, the S@Co,N-MPC-10% electrode presents stable cycling (1134.63 mAh g−1 after 100 cycles at 0.2 C) and high rate capacity (835.01 mAh g−1 at 3.0 C). This work might provide beneficial insights to the development of efficient sulfur matrixes of RT Na–S batteries.