The vibration of gun barrels would result in the change of impact point, which would further reduce the firing accuracy of weapons. In the past, the calculation model based on the Euler beam theory could not satisfy the accuracy requirements. Based on the Timoshenko beam theory, the vibration equation of the stepped beam is established by invoking continuum transfer matrix method. The forced vibration of the stepped beam under the inertial moving load is solved. The model has better precision than the Euler beam model. The endpoint of the cantilever beam is analyzed. It is shown that the endpoint response increases with the increasing mass and acceleration of moving load, so does the inertial coefficient. With the increase of moving load speed, the endpoint response decreases, and the inertia coefficient increases. Among the three parameters, the mass of moving load is the main factor affecting the inertia coefficient. Furthermore, both free and forced vibrations of other stepped beam shaped structures with arbitrary segments and boundary conditions can be explored by using the proposed method.