A variational principle is established to provide a new formulation for convex Hamiltonian systems. Using this formulation, we obtain some existence results for second-order Hamiltonian systems with a variety of boundary conditions, including nonlinear ones.