A least-squares spectral collocation method for the one-dimensional inviscid Burgers equation is proposed. This model problem shows the stability and high accuracy of these schemes for nonlinear hyperbolic scalar equations. Here we make use of a least-squares spectral approach which was already used in an earlier paper for discontinuous and singular perturbation problems (Heinrichs, J. Comput. Appl. Math. 157:329-345, 2003). The domain is decomposed in subintervals where continuity is enforced at the interfaces. Equal order polynomials are used on all subdomains. For the spectral collocation scheme Chebyshev polynomials are employed which allow the efficient implementation with Fast Fourier Transforms (FFTs). The collocation conditions and the interface conditions lead to an overdetermined system which can be efficiently solved by least-squares. The solution technique will only involve symmetric positive definite linear systems. The scheme exhibits exponential convergence where the exact solution is smooth. In parts of the domain where the solution contains discontinuities (shocks) the spectral solution displays a Gibbs-like behavior. Here this is overcome by some suitable exponential filtering at each time level. Here we observe that by over-collocation the results remain stable also for increasing filter parameters and also without filtering. Furthermore by an adaptive grid refinement we were able to locate the precise position of the discontinuity. Numerical simulations confirm the high accuracy of our spectral least-squares scheme.