This paper provides rigorous derivation of a Hamiltonian from a given Lagrangian of solid continuum, for a possible improvement of dynamic analysis. The derived Hamiltonian, unlike an ordinary one, has momentum and strain as argument, and the associated canonical equation includes spatial derivative in it. Characteristics of the Hamiltonian of this form are studied. The appearance of strain rate in the canonical equation, which has been overlooked in the past researches, is pointed out. For numerical computation, a Hamiltonian for discretized functions is derived. It is shown that discretized strain rate appears in the canonical equation when suitable discretization scheme is applied.