The newly developed optimal nearly analytic discrete (ONAD) and the weighted Runge-Kutta discontinuous Galerkin (WRKDG) methods can effectively suppress the numerical dispersion caused by discretizing wave equations, but it is difficult for ONAD to implement on flexible meshes, whereas the WRKDG has high computational cost for wavefield simulations. We have developed a new hybrid algorithm by combining the ONAD method with the WRKDG method. In this hybrid algorithm, the computational domain was split into several subdomains, in which the subdomain for the ONAD method used regular Cartesian grids, whereas the subdomain for the WRKDG method used triangular grids. The hybrid method was at least third-order spatially accurate. We have applied the proposed method to simulate the scalar wavefields for different models, including a homogeneous model, a rough topography model, a fracture model, and a cave model. The numerical results found that the hybrid method can deal with complicated geometrical structures, effectively suppress numerical dispersion, and provide accurate seismic wavefields. Numerical examples proved that our hybrid method can significantly reduce the CPU time and save storage requirement for the tested models. This implies that the hybrid method is especially suitable for the simulation of waves propagating in complex media.