For the first time, this paper presents an efficient solution for the vibration analysis of damped axially functionally graded beams with non-uniform cross-sections subjected to the axial force based on the Galerkin method and state-space formulation. Euler-Bernoulli and Rayleigh’s theories are considered to derive the governing equations of motion. Currently, simply supported beams are under investigation due to their easy fabrication and typical applications in various bridge components, buildings, and machine tools. Likewise, the proposed method is applicable to other continuous systems without any limitation on boundary conditions, material properties, or arbitrary representation of cross-sections. Moreover, complex and purely real eigenvalues are determined by outlining the state-space framework. Compared to the conventional method, the present formulation reduces computational complexity and simplifies computer implementation, especially in the case of inhomogeneous materials. Then, an extensive parametric study is performed to evaluate the effect of various characteristics on the dynamic behavior of the viscoelastic nonlocally damped beams. Results reveal that the inhomogeneity index in material constituents has a considerable influence on the eigensolutions. Additionally, it is shown that when the relaxation constant and length parameter tend to infinity there would be a decline in the increasing rate of eigenvalues.