The problem of stability of fluid-conveying carbon nanotubes embedded in an elastic medium is investigated in this paper. A nonlocal continuum mechanics formulation, which takes the small length scale effects into consideration, is utilized to derive the governing fourth-order partial differential equations. The Fourier series method is used for the case of the pinned–pinned boundary condition of the tube. The Galerkin technique is utilized to find a solution of the governing equation for the case of the clamped–clamped boundary. Closed-form expressions for the critical flow velocity are obtained for different values of the Winkler and Pasternak foundation stiffness parameters. Moreover, new and interesting results are also reported for varying values of the nonlocal length parameter. It is observed that the nonlocal length parameter along with the Winkler and Pasternak foundation stiffness parameters exert considerable effects on the critical velocities of the fluid flow in nanotubes. © 2017, Pleiades Publishing, Ltd.