Over the past two decades, the quick development of wireless sensor networks has required the sensor nodes being self-powered. Pushed by this goal, in this work, we demonstrated a ZnO nanowire-array-based piezoelectric nanogenerator (NG) prototype, which can convert mechanical energy into electricity. High-quality single crystalline ZnO nanowires, having an aspect ratio of about 15, grown on gold-coated silicon substrate, were obtained by using a low-cost and low-temperature hydrothermal method. The NG-device fabrication process has been presented in detail, and the NG's performance has been tested in both compression and vibration modes. Peak power of 1.71 mu W was observed across an optimal load resistance of 5 M Omega for the ZnO nanowires-based NG, with an effective area of 0.7 cm(2), which was excited in compression mode, at 9 Hz, corresponding to similar to 38.47 mW/cm(3) volume-normalized power output. The measured voltage between the top and bottom electrodes was 5.6 V. In vibration mode, at 500 Hz, the same device showed a potential of 1.4 V peak-to-peak value and an instantaneous power of 0.04 mu W, corresponding to an output power density of similar to 0.9 mW/cm(3).