Hierarchical anatase TiO2 porous nanopillars with high crystallinity and stability were fabricated by the following four steps: (i) synthesis of a titanium glycolate nanopillar precursor; (ii) transformation into stable nanopillars consisting of amorphous TiO2 primary nanoparticles at low temperature; (iii) treatment with ethylenediamine aqueous solution to protect the nanopillar structure, restrain nanoparticle growth and retard phase transformation; (iv) calcination at temperatures as high as 700 °C to form hierarchical anatase TiO2 porous nanopillars. The results of SEM, TEM and XRD reveal that these TiO2 nanopillars have a porous structure, and that their length can be easily controlled by the volume ratio of ethylene glycol to tetrabutyl titanate. In addition, dye-sensitized solar-cells (DSSCs) were assembled with sandwich-structure photoanodes, which are composed of a layer of TiO2 nanopillars sandwiched between two layers of TiO2 nanoparticles. The photoelectrical measurement results show that the power conversion efficiency of DSSCs enhances with the increase of nanopillar length and crystallinity. This is attributed to the effective transfer of photogenerated electrons in TiO2 nanopillars and their porous microstructures in favor of dye adsorption, as demonstrated by surface photovoltage spectroscopy (SPS) and electrochemical impedance spectroscopy (EIS).