We propose the adaptive spectral Koopman (ASK) method to solve nonlinear autonomous dynamical systems. This novel numerical method leverages the spectral-collocation (i.e., pseudo-spectral) method and properties of the Koopman operator to obtain the solution of a dynamical system. Specifically, this solution is represented by Koopman operator’s eigenfunctions, eigenvalues, and Koopman modes. Unlike conventional time evolution algorithms such as Euler’s scheme and the Runge-Kutta scheme, ASK is mesh-free, and hence is more flexible when evaluating the solution. Numerical experiments demonstrate high accuracy of ASK for solving both ordinary and partial differential equations. Further, ASK enables new designs of uncertainty quantification (UQ) methods, which can be much faster than state-of-the-art UQ methods. Finally, we will illustrate ASK's capability of solving optimization problems based on the gradient flow formula.