A “moistelectric” nanogenerator based on gradient doped polypyrrole nanowire has been fabricated by concentration-controlled electro-deposition (CCED) technique. The specially designed composition and structure of the gradient doped polypyrrole nanowire endow it with huge surface area and one-dimensional transport nanochannels, which can largely facilitate the diffusion of water molecules to generate the dissociated charged ions as free carriers. For a polypyrrole nanowire with a diameter of 200 nm, it exhibits a high-output voltage in excess of 72 mV, a remarkable output current of 0.45 nA, and a maximum output power density of 103.13 mW cm−2 by area and 9.0 × 104 W kg−1 by mass under the ΔRH of 75%. On this basis, a vertically aligned gradient doped polypyrrole nanowire arrays show high current output of 0.14 μA without voltage drop. This work presents the first example that the power is gathered from moisture via polymer nanogenerators for energy-conversion application.