Layered molybdenum disulfide (MoS2) has received much attention as one of the most promising energy-storage and conversion materials for Li/Na ion batteries. Here, a simple and effective approach is proposed for the rational design and preparation of hierarchical three-d imensional (3D) amorphous N-doped carbon nanotube@MoS2 nanosheets (3D-ANCNT@MoS2) via a simple hydrothermal method, followed by an annealing process. With such a unique nanoarchitecture, ultrathin MoS2 nanosheets grown on the external surfaces of polypyrrole-derived ANCNTs are assembled to form a hierarchical 3D nanoarchitecture, where the adopted ANCNTs serve not only as the template and continuous conductive matrix, but can also prevent MoS2 from aggregating and restacking, and help to buffer the volumetric expansion of MoS2 during cycling. More importantly, when evaluated as an anode material for lithium-ion batteries, the 3D-ANCNT@MoS2 composite exhibits excellent cycling stability, superior rate performance, and reversible specific capacity as high as 893.4 mAh·g-1 at 0.2 A·g-1 after 200 cycles in a half battery, and 669.4 mAh·g-1 at 0.2 A·g-1 after 100 cycles in the 3D-ANCNT@MoS2//LiCoO2 full battery. With respect to sodium-ion batteries, the outstanding reversible capacity, excellent rate behavior, and good cycling performance of 3D-ANCNT@MoS2 composites are also achieved.