In this article, the dynamics of pipes containing fluid is investigated according to Timoshenko’s beam theory. The problem’s equations were extracted with the help of Hamilton’s principle, and then their responses were obtained using Galerkin’s numerical approach. The modeling of the vertical pipe containing fluid was done using Timoshenko’s beam theory. It is prominent to mention that the considered vertical pipe containing fluid has variable length. The results of this analysis will be compared with previous researches, which were according to Euler–Bernoulli theory. Also, the gravity effect on the pipe stability will be analyzed. Finally, by examining the impact of rotational inertia and shear deformation separately, it was determined that the effect of shear deformation on the pipes’ dynamic behavior containing fluid will be more than the effect of rotational inertia.