In this paper, a three-dimensional (3D) anode of dense nanocavities inside TiO2 nanowire array (TNWA) was synthesized by a hydrothermal route using anodic TiO2 nanotube array (TNTA) as a starting material. TNWA-D, which was prepared by the same hydrothermal route using Ti substrate directly, and TNTA were also studied for comparison. The morphology and crystal structure were studied by glancing angle X-ray diffraction (GAXRD), field emission scanning electron microscopy (FE-SEM) and transmission electron microscopy (TEM). The electrochemical performance was evaluated by galvanostatic charge–discharge tests and alternating current (AC) impedance spectroscopy, and the formation mechanisms of TNWA and TNWA-D were discussed. The results showed that TNWA had a unique nanostructure with long, fine and uniform nanowires, and it was worth noting that dense nanocavities distributed on the surface of nanowires, which enhanced the electrical conductivity and surface area greatly. The TNWA anodes exhibit higher electrochemical performance than that of TNTA and TNWA-D anodes. At 0.2C rate, TNWA anode delivers the specific capacities of 305.8mAhg−1, which is more than that of TNTA (288.4mAhg−1) and TNWA-D (29.1mAhg−1). After 50cycles at different current densities, it still retains 257mAhg−1. The electrochemical performance of TNWA-D anode is the worst one due to its poor electrical conductivity resulting from the large amounts of broken, litter and non-uniform nanowires.