Based on nonlocal Euler-Bernoulli beam theory, vibration characteristics are investigated for a fluid-conveyed single-walled carbon nanotube (SWCNT) which is embedded in a elastic medium and subjected to a longitudinal magnetic field. Governing equations of motion are derived for vibration analysis of fluid-conveyed SWCNTs, where the Lorentz magnetic force and the surrounding elastic medium have been taken into consideration. Subsequently, differential transfermation method (DTM) is employed to compute the critical fluid velocity for fluid-conveyed SWCNTs with simple surported boundary condition. The obtained results are followed by a detailed parametric study of the effects of nonlocal parameter, elastic foundation parameter and longitudinal magnetic field on the vibration of fluid-conveyed SWCNTs. Through various numerical studies, the coupling effects of nonlocal parameter, elastic foundation parameter and the strength of magnetic field on the critiacal fluid velocity of the fluid-conveyed SWCNT are carefully examined.