The stability of underground rock engineering is strongly affected by cavities. To analyse the dynamic response and fracture evolution of rock mass containing cavities, intact specimens and those containing a single rectangular cavity or two rectangular cavities with different layouts were tested by using split Hopkinson pressure bar (SHPB) test system under three levels of nitrogen gas actuating pressures (0.35��MPa, 0.40��MPa and 0.45��MPa). During tests, failure process was recorded by a high-speed camera. Then, digital image correlation (DIC) techniques combined with displacement trend line method was employed to investigate the crack evolution and failure modes. Moreover, absorbed energy per unit volume was calculated to evaluate specimen fragmentation. Test results reveal that under a given impact pressure, the dynamic loading capacity is apparently higher for intact specimens than for those containing cavities. Although the incident energy has varying influence on the fragmentation of specimens in different cases, the crack evolution and failure modes seem to be independent on incident energy but mainly associated with cavity number and layout. The existence of cavities contributes to the degradation of dynamic loading capacity and absorbed energy. For specimens containing two cavities, the twin-cavity system with the connecting angle of 45�� exhibits the maximum weakening effect on the mechanical parameters. In comparison, when the connecting angle is 90��, the specimens containing two cavities hold the maximum average dynamic loading capacity, which approximates that of the specimens containing a single cavity.