In this paper, a new framework for continuous-time maximum a posteriori estimation based on the Chebyshev polynomial optimization (ChevOpt) is proposed, which transforms the nonlinear continuous-time state estimation into a problem of constant parameter optimization. Specifically, the time-varying system state is represented by a Chebyshev polynomial and the unknown Chebyshev coefficients are optimized by minimizing the weighted sum of the prior, dynamics and measurements. The proposed ChevOpt is an optimal continuous-time estimation in the least squares sense and needs a batch processing. A recursive sliding-window version is proposed as well to meet the requirement of real-time applications. Comparing with the well-known Gaussian filters, the ChevOpt better resolves the nonlinearities in both dynamics and measurements. Numerical results of demonstrative examples show that the proposed ChevOpt achieves remarkably improved accuracy over the extended/unscented Kalman filters and RTS smoother, close to the Cramer-Rao lower bound.