In seismic exploration, propagation of seismic wave in earth medium is very complex. Theory of analytical mechanics has advantages for solving complicated problems. In this paper, with the hypothesis of viewing geological medium as an elastic medium, the Lagrange equations of analytical dynamics are built for homogeneous and inhomogeneous earth media. Then the seismic wave equations of elastic medium are obtained from the Lagrange equations. The results provide the basis to study propagation of seismic wave in earth medium and discuss problems related to seismic exploration using Lagrange analytic dynamics.