A new numerical method is presented to solve optimal control problem of a chaotic system based on Gauss pseudospectral method (GPM). Firstly, the Lagrange interpolation polynomials are constructed on Legendre-Gauss nodes and used to parameterize the state and control the trajectories in optimal control of the chaotic system. Then, the chaotic optimal control problem in the continuous space is transformed into a nonlinear programming (NLP) problem through GPM. Furthermore, the NLP problem is solved by the sequential quadratic programming algorithm. Finally, the proposed method is applied to the optimal control of the typical Lorenz, Chen, and Liu chaotic systems respectively. The simulation processes indicate that the GPM is effective, fast and feasible for solving optimal control problems of chaotic systems.