A finite-difference algorithm linking Euler and Lagrange meshes was developed to compute the cavity-decoupling explosion, in which both the explosion products and ideal air in the cavity were subdivided as Euler mesh but the rock around the cavity was subdivided as Lagrange mesh. The stress wave induced by cavity explosion were simulated and the relations of the seismic source function and the cavity size were discussed. The results show that with the increase of the cavity, the peak stress of the stress wave, the stable value of the seismic source function, and the corner frequency decrease, but the decoupling factor increases.