The calculation of finite temperature ESR spectra for concrete specified crystal configurations is a very important issue in the study of quantum spin systems. Although direct evaluation of the Kubo formula by means of numerical diagonalization yields exact results, memory and CPU-time restrictions limit the applicability of this approach to small system sizes. Methods based on the time evolution of a single pure quantum state can be used to study larger systems. One such method exploits the property that the expectation value of the autocorrelation function obtained for a few samples of so-called thermal typical states yields a good estimate of the thermal equilibrium value. In this paper, we propose a new method based on a Wiener-Khinchin-like theorem for quantum system. By comparison with exact diagonalization results, it is shown that both methods yield correct results. As the Wiener-Khinchin-based method involves sampling over thermal typical states, we study the statistical properties of the sampling distribution. Effects due to finite observation time are investigated and found to be different for the two methods but it is also found that for both methods, the effects vanish as the system size increases. We present ESR spectra of the one-dimensional XXZ Heisenberg chain of up to 26 spins show that double peak structure due to the anisotropy is a robust feature of these spectra.Quantum spin systems have attracted interests for decades because they exhibit various nontrivial behavior due to quantum mechanical effects. In particular, in low dimensions, quantum fluctuations due to non-commutativity of the spin operators and/or competition among the interaction (frustration) play an important role and various novel concepts, such as the valence-bond solid, resonating-valence bonds, and magnon Bose-Einstein condensation, etc. have been developed. One important topic is the effect of nonmagnetic defects. In a spin S = 1/2 antiferromagnetic Heisenberg chain, quantum fluctuations prevent the spins from being ordered, even at T = 0K, and the ground state is nonmagnetic. However, nonmagnetic defects break the translational symmetry and polarize the surrounding spins [1][2][3]. Then the one-dimensional system is described by an open-ended spin chain. An example of such a system is the Pd doped chain Sr 2 CuO 3 [4][5][6].ESR is one of the major tools to study the effects of defects in spin systems. Modeling the ESR spectra of intrinsic defects in spin chains is an important problem for which data for finite but rather long chains are necessary. In particular, the parameter dependence of concrete ESR spectrum for a specified system is of great interest and the temperature dependence of the ESR spectrum provides a lot of information about the spin ordering. To study these aspects theoretically, the explicit form of interactions and spatial configuration of magnetic ions in the lattice play an important role and it is necessary to study microscopic models, that is we should calculate the ESR spectrum for specific quantum ...