The main objective of the present work is devoted to the study of both free and time-dependent forced axial vibration simultaneously in single-walled carbon nanotubes subjected to a moving load. The governing equation is derived via Hamilton’s principle. Classical theory, along with the Rayleigh and Bishop theories, is used to analyze the nonlocal vibrational behaviors of single-walled carbon nanotubes. A Galerkin method is established to solve the derived equations. The boundary conditions are assumed to be clamped-clamped and clamped-free. Firstly, the variation of nondimensional natural frequencies is calculated based on the classical theory, and the effect of the nonlocal parameter, the mode number and the length is illustrated and schematically compared for clamped-clamped and clamped-free boundary conditions. Besides, the obtained nondimensional responses are compared with the results of another study to validate the accuracy of the used method. Ultimately, the dynamic axial displacement due to the moving load in the time domain has been studied for the first time. Furthermore, the effects of the thickness, length, velocity of the moving load, excitation frequency, and the nonlocal parameter based on the classical, Rayleigh, and Bishop theories are investigated in this paper. Also, the influence of the nonlocal parameter on the variations of maximum axial displacement with respect to the velocity parameter for the aforementioned boundary conditions and theories is evaluated relative to each other.