It is highly challenging but imperative to develop highly efficient, low-cost and environmentally friendly bifunctional electrocatalysts for both hydrogen evolution reaction (HER) and oxygen evolution reaction (OER). Herein, we successfully prepared hierarchically porous Ni3S2 nanorod array foam through a simple hydrothermal process assisted by the pretreatment with HCl. The resulting hierarchically porous Ni3S2 nanostructures exhibits excellent catalytic activity and stability towards both HER and OER with low overpotential of 200mV and 217mV at current density of 10mAcm−2 for HER and OER, respectively, which are among the best non-noble metal HER/OER electrocatalysts reported in literatures. The as-prepared bifunctional electrocatalyst for both HER and OER could act as the promising electrode materials for water splitting.