A nanocomposite electrical generator composed of an array of zinc oxide nanowires is considered. The electric potential distribution along zinc oxide nanowires is modeled using continuum mechanics and Maxwell's equations for the case of axial loading. A perturbation technique is used for decoupling the constitutive equations. The governing differential equations are solved using a finite difference method. It is shown that a gradient of electric potential exists along the axis of the zinc oxide nanowires. Maximum and minimum values of electric potential exist at the extreme ends along the nanowire length and have opposite signs. The positive and negative voltages are separated by a zero-valued electric potential at the middle of the nanowire. It is also shown that the electric potential is a strong function of shear stress at the interface of matrix-nanowire. The proposed system and loading configuration can generate up to 160% more electric potential than the values reported for the nanowire in the bended configuration, which results in a more sustainable energy source.