We show that the classical Hamburger moment problem can be included in the spectral theory of generalized indefinite strings. Namely, we introduce the class of Krein-Langer strings and show that there is a bijective correspondence between moment sequences and this class of generalized indefinite strings. This result can be viewed as a complement to the classical results of M. G. Krein on the connection between the Stieltjes moment problem and Krein-Stieltjes strings and I. S. Kac on the connection between the Hamburger moment problem and 2x2 canonical systems with Hamburger Hamiltonians.