An axially traveling string system, which is a kind of traveling material, attracts considerable attention owing to its broad applications. In this paper, an analytical wave solution for the vibration and energy of an axially traveling string with fixed and viscous damper (dashpot) boundaries in any propagation cycle is considered. Firstly, a novel recursive and simplified technique is proposed to expand the analytical solution for a traveling string to any propagation cycle, which was limited to only one propagation cycle due to complexity in previous work. As a kind of analytical solution, the traveling wave method has more accuracy and efficiency compared to numerical methods. Secondly, different from the previous result, the modified Hamilton’s principle is applied to the derivation of the dashpot boundary condition for the mass changing of the traveling string. Following the pipeline hydrodynamics theory, the energy gradient for the ‘control volume’ and the ‘system’ of traveling string are accurately obtained, respectively. Thirdly, from the point of view of vibration suppression, the optimal damping at the right end of the string is defined and the optimal damping value is derived, which is of considerable practical interest in vibration suppression at boundaries for axially traveling materials.