We report an easy way to assemble porous one-dimensional (1D) Ni2P nanowires through phosphatization of a Ni(SO4)0.3(OH)1.4 nanobelt precursor. The peculiar synthetic process endows the Ni2P nanowires with large surface area, hierarchical porous structure and the ability to form closely connected network for transporting both electrons and electrolytes, which in conjunction with the high intrinsic electrocatalytic activity make it an excellent low-cost counter electrode material for dye-sensitized solar cells (DSSCs). Indeed, the first investigation of such novel counter electrode for DSSC presented superb photovoltaic performance rivaling the conventional Pt counter electrode.