Transition metal dichalcogenides (TMDs) have attracted increasing attention for rechargeable batteries because of its high theoretical capacity. However, its real application is limited by the intrinsic low electron conductivity and inferior structural stability. Herein, we report the fabrication of one-dimensional (1D) MoSe2/C nanorods composite from organic-inorganic hybrid Mo3O10(C2H10N2) (named as MoOx-EDA) with subsequent selenization and carbon coating process. As anode materials for lithium-ion batteries (LIBs) and sodium-ion batteries (SIBs), the carbon-encapsulated composite exhibited enhanced Li+/Na+ storage properties compared to MoSe2 nanorods, including good cycling stability and high rate capability. A specific capacity of 835 mA h g−1 can be obtained at a current density of 200 mA g−1 for the MoSe2/C electrode in LIBs, which retained 755 mA h g−1 after 200 cycles. Moreover, a reversible Na+ storage capacity of 404 mA h g−1 can be remained after 100 cycles at a current density of 200 mA g−1. The good electrochemical performances of the MoSe2/C nanorod composites can be attributed to the bicontinuous electron/ion pathways, low charge transfer resistance, and robust structure stability.