In this work, nitrogen-doped, yolk-shell-structured CoSe/C mesoporous dodecahedra are successfully prepared by using cobalt-based metal-organic frameworks (ZIF-67) as sacrificial templates. The CoSe nanoparticles are in situ produced by reacting the cobalt species in the metal-organic frameworks with selenium (Se) powder, and the organic species are simultaneously converted into nitrogen-doped carbon material in an inert atmosphere at temperatures between 700 and 900 °C for 4 h. For the composite synthesized at 800 °C, the carbon framework has a relatively higher extent of graphitization, with high nitrogen content (17.65%). Furthermore, the CoSe nanoparticles, with a size of around 15 nm, are coherently confined in the mesoporous carbon framework. When evaluated as novel anode materials for sodium ion batteries, the CoSe/C composites exhibit high capacity and superior rate capability. The composite electrode delivers the specific capacities of 597.2 and 361.9 mA h g-1 at 0.2 and 16 A g-1, respectively. ©2017 American Chemical Society.