It is still a challenging task to develop a facile and scalable process to synthesize porous hybrid materials with high electrochemical performance. Herein, a scalable strategy is developed for the synthesis of few-layer MoS2 incorporated into hierarchical porous carbon (MHPC) nanosheet composites as anode materials for both Li- (LIB) and Na-ion battery (SIB). An inexpensive oleylamine (OA) is introduced to not only serve as a hinder the stacking of MoS2 nanosheets but also to provide a conductive carbon, allowing large scale production. In addition, a SiO2 template is adopted to direct the growth of both carbon and MoS2 nanosheets, resulting in the formation of hierarchical porous structures with interconnected networks. Due to these unique features, the as-obtained MHPC shows substantial reversible capacity and very long cycling performance when used as an anode material for LIBs and SIBs, even at high current density. Indeed, this material delivers reversible capacities of 732 and 280 mA h g(-1) after 300 cycles at 1 A g(-1) in LIBs and SIBs, respectively. The results suggest that these MHPC composites also have tremendous potential for applications in other fields.