Cantilevered pipe conveying fluid may become unstable and flutter instability would occur when the velocity of the fluid flow in the pipe exceeds a critical value. In the present study, the theoretical model of a cantilevered fluid-conveying pipe attached by an inerter-based dynamic vibration absorber (IDVA) is proposed and the stability of this dynamical system is explored. Based on linear governing equations of the pipe and the IDVA, the effects of damping coefficient, weight, inerter, location and spring stiffness of the IDVA on the critical flow velocities of the pipe system is examined. It is shown that the stability of the pipe may be significantly affected by the IDVA. In many cases, the stability of the cantilevered pipe can be enhanced by designing the parameter values of the IDVA. By solving nonlinear governing equations of the dynamical system, the nonlinear oscillations of the pipe with IDVA for sufficiently high flow velocity beyond the critical value are determined, showing that the oscillation amplitudes of the pipe can also be suppressed to some extent with a suitable design of the IDVA.