We study the effect of a finite temperature on the correlation function of quantum magnetic vortex lines in the framework of the (3 + 1)-dimensional Abelian Higgs model. The vortex energy is inferred from the large distance behavior of these correlation functions. For large straight vortices of length L, we obtain that the energy is proportional to TL2 differently from the zero temperature result which is proportional to L. The case of closed strings is also analyzed. For T = 0, we evaluate the correlation function and energy of a large ring. Finite closed vortices do not exist as genuine excitations for any temperature.