The present paper proposes a new equation utilizing the nonlocal Euler-Bernoulli beam model to investigate the linear transverse vibration of an embedded single-walled carbon nanotube (SWCNT) which incorporates an extra-added nanoparticle. The elastic behavior of the surrounding medium is simulated by the Pasternak-type foundation model. Hamilton’s principle is applied to derive the governing equation, and the natural frequencies are obtained by the Galerkin method. The numerical results are compared with the molecular dynamics (MD) simulation as well as with the local continuum approach in the previous literature, to validate the nonlocal continuum elastic model. Unlike the classical continuum model, the present new approach shows acceptable accuracy and good agreement to the MD approximation. The results indicate that the fundamental frequencies are significantly dependent on the attached mass and boundary conditions. To study the effects of supported end conditions, three typical boundary conditions, namely clamped-clamped, clamped-pinned and pinned-pinned, are simulated. It is found that an attached mass causes a noticeable reduction in natural frequencies, in particular, for the clamped-clamped boundary condition, a stiff medium, stocky SWCNT and a small nonlocal parameter. In addition, when the position of the added nanoparticle is closer to the middle point of SWCNT length, the mass sensitivity is increased. Detailed results demonstrate that the present equation-based nonlocal continuum theory can be utilized for SWCNT-based mass sensor, efficiently.