The aim of this embodiment is to present an analytical analysis of a functionally graded piezoelectric energy harvester consisting of a flexible functionally graded piezoelectric layers carrying magnetic mass at the free end. The magnetic tip mass is in interaction with a permanent magnet which is located at a distance from the top of the tip mass. The oscillation of the harvester happens via excitation of the base. Using Rayleigh’s beam theory and Hamilton’s principle and considering geometric nonlinearity, the coupled electromechanical governing equations have been developed. The nonlinear frequency response of the piezoelectric energy harvester beam has also been studied under base excitation. A parametric study has been carried out to investigate the effect of grading index and magnetic force on responses of both free vibration and induced excitation cases. The results were compared with those obtained using three-dimensional finite element model developed in COMSOL Multiphysics 5.5 commercial software and good agreement has been observed. The results from both the analytical method and simulation confirm that tuning the design parameters of grading index and magnetic gap to the optimal value results in a considerable change in the performance of the energy harvester. © The Author(s) 2021.