Spectral methods, thanks to the high accuracy and the possibility of using fast algorithms, represent an effective way to approximate collisional kinetic equations in kinetic theory. On the other hand, the loss of some local invariants can lead to the wrong long time behavior of the numerical solution. We introduce in this paper a novel Fourier-Galerkin spectral method that improves the classical spectral method by making it conservative on the moments of the approximated distribution, without sacrificing its spectral accuracy or the possibility of using fast algorithms. The method is derived directly using a constrained best approximation in the space of trigonometric polynomials and can be applied to a wide class of problems where preservation of moments is essential. We then apply the new spectral method to the evaluation of the Boltzmann collision term, and prove spectral consistency and stability of the resulting Fourier-Galerkin approximation scheme. Various numerical experiments illustrate the theoretical findings.