The wave propagation is often carried out in complex geological structures. Solving the wave propagation problem effectively in inhomogeneous medium is of great interest and has many applications in physics and engineering. In this paper, the local discontinuous Galekin (LDG) method is applied to the numerical solution of the second-order wave equation. Firstly, the auxiliary variables are introduced, and the second-order wave equations are written as a system of first-order partial differential equations. Then the discontinuous Galerkin format is applied to the corresponding linearized wave equations and adjoint equations. We consider the triangulation in this paper. In order to ensure that the discrete format satisfies the energy conservation, the generalized alternating flux is chosen on the element boundary. We proves that the LDG method satisfies the energy conservation. The exponential integral factor method is used in time discretization. In order to improve the computational efficiency, the Krylov subspace method is used to approximate the product of the exponential matrix and the vector. Numerical examples with exact solutions are given in numerical experiments. The numerical results verify the numerical precision and energy conservation of the LDG method. In addition, the calculation of inhomogeneous medium and complex computational regions are considered. The results show that the LDG method is suitable for simulation of complex structures and propagation in multi-scale structured medium.