Acoustic wave equation is usually used for modeling in homogeneous media, but for modeling in heterogeneous media, some calculation errors will appear. So a transition layer at the interface is used for overcoming this problem to take the elastic parameters as continuous change. Here, the heterogeneous acoustic wave equation is solved with the finite-element method, so the elastic parameters in each element are interpolated and satisfied the modeling requirement in heterogeneous body. By altering the discontinuous interface into transition layer, the computing errors can be controlled when the size of element is small enough, in order to improve the accuracy of modeling. Finally, several numerical examples verified the validity of this method.