A novel numerical method is proposed to solve the nonlinear Hamiltonian equation with consideration of perturbation terms in this study. Firstly, the original nonlinear Hamiltonian equation is formulated in the formal way and the corresponding conservation law is introduced. Considering the constant perturbation terms in the original nonlinear Hamiltonian equation, the perturbation series expansion method is proposed to obtain the response of the nonlinear Hamiltonian equation. Within the method, the solution to the original equation can be transformed into a perturbation series by introducing said small parameters. Based on the Taylor series expansion method, a series of modified nonlinear Hamiltonian equations for predicting the responses are derived. Moreover, the time history and phase diagram of the nonlinear Hamiltonian equation can be obtained based on the symplectic conservative algorithm. Additionally, the conservative law for the modified Hamiltonian equation is given. The performance of the proposed perturbation series expansion method is evaluated by using three numerical examples. Numerical examples indicate that the proposed method is effective and feasible for calculating the response of nonlinear Hamiltonian equation taking into account perturbation terms.