Abstract: The present work is aimed at analyzing free longitudinal vibrations of nanorods composed of a functionally graded (FG) material with deformable boundaries within a hardening nonlocal elasticity approach. For this purpose, a FG nanorod composed of the ceramic and metal constituents is considered to be elastically supported by means of axial springs at both ends. Then the analytical method based on the association of the Fourier sine series and the Stokes transformation is developed to solve the free axial vibration problem of a FG nanorod with both deformable and nondeformable boundaries. Free axial vibration of a restrained FG nanorod is first studied within hardening nonlocal elasticity. To show the validity and profitability of the proposed analytical method, the presented Fourier series method with the Stokes transformation is used for the analysis of axial vibration of a rigidly supported homogeneous nanorod by setting the appropriate spring stiffness values. The main superiority of this new approach is in its power of dealing with numerous boundary conditions to determine longitudinal vibration frequencies of FG nanorods. Using the present solution method, various numerical applications are given for different small-scale parameters, gradient index, and nanorod length.