Molybdenum disulfide (MoS 2) is a promising candidate as a high-performing anode material for sodiumion batteries (SIBs) due to its large interlayer spacing. However, it suffers from continued capacity fading. This problem could be overcome by hybridizing MoS 2 with nanostructured carbon-based materials, but it is quite challenging. Herein, we demonstrate a single-step strategy for the preparation of MoS 2 coupled with ordered mesoporous carbon nitride using a nanotemplating approach which involves the pyrolysis of phosphomolybdic acid hydrate (PMA), dithiooxamide (DTO) and 5-amino-1Htetrazole (5-ATTZ) together in the porous channels of 3D mesoporous silica template. The sulfidation to MoS 2 , polymerization to carbon nitride (CN) and their hybridization occur simultaneously within a mesoporous silica template during a calcination process. The CN/MoS 2 hybrid prepared by this unique approach is highly pure and exhibits good crystallinity as well as delivers excellent performance for SIBs with specific capacities of 605 and 431 mAhg À 1 at current densities of 100 and 1000 mAg À 1 , respectively, for SIBs.