Conventional piezoelectric energy harvesters are cantilever beams made of homogenous substructure and piezoelectric layers that produce alternating voltage due to their vibrations. Recently, a class of new emerging composite materials, the carbon nanotubes (CNTs)-reinforced composite, has been proposed making use of CNTs as the reinforcements in a functionally graded (FG) pattern. Harvesters made of functionally graded CNTs-reinforced substructure materials have not been studied in the energy harvesting literature, yet. Thus, in this study, functionally graded piezoelectric CNTs-reinforced harvesters as new energy harvesters subjected to harmonic and random vibrations are analyzed. The harvester is assumed to be comprised of piezoelectric and FG-CNTs-reinforced substructure layers. Five types of CNTs distributions through the substructure thickness direction are considered. The generalized Hamilton’s principle for electromechanical materials based on Euler–Bernoulli beam assumption is adopted in the derivation of governing equations. The finite element formulation of the equations is also presented. Time and frequency domain analyses of the finite element equations are performed. The output power from the CNTs-reinforced harvesters subjected to random and harmonic base excitations is calculated. The harvested energy of the CNTs-reinforced harvesters is compared, and it is concluded that the CNTs distribution has a significant effect on the deflection, produced voltage and harvested power.