We give an efficient Monte Carlo method of calculating the elementary excitation spectrum of quantum systems. The lowest energy with an arbitrary momentum is obtained by the projector Monte Carlo method. This method is applied to the spin-1/2 and spin-1 Heisenberg antiferromagnetic chains of length 32. For the S=1/2 case, the spectrum coincides completely with des Cloiseaux and Pearson’s spectrum. For the S=1 case, the spectrum has a gap at the momentum π as was predicted by Haldane. The value of the gap coincides with Nightingale and Blöte’s calculation. The spectrum satisfies the variational relation to the structure factor. The properties of S = 1 Heisenberg antiferromagnetic chains are completely different from those of S = 1/2 Heisenberg antiferromagnetic chains. This method is also applied to the anisotropic S = 1 Heisenberg chain. The results are in excellent agreement with those of the diagonalization method and experiment.