In this paper a method is presented to estimate the unknown parameters of chaotic system based on the variational principle, which can be applied to all chaotic systems governed by the following equation:x= F(x,θ). Firstly,the equation of the chaotic system is included into the objective functional. Secondly, the universal formulas of the adjoint equation for chaotic systems and the functional gradient for unknown parameters are derived using the variational principle. Thirdly, the algorithm to estimate unknown parameters of chaotic system is designed according to above formulas. Finally, all unknown parameters of the typical Lorenz chaotic system and the hyperchaotic Chen system are estimated separately. Numerical simulations show that the effectiveness and the feasibility of the proposed method to estimate unknown parameters of chaotic systems.