Presence of natural and man-made cavities can affected rock mass strength. This is more important especially when the cavities are located in shallow depth and have sensitive applications such as metro and military targets. Therefore, the aim of this study was to evaluate the effect of elliptical cavity on rock behavior under static and dynamic loads. In order to evaluate the effect of the cavity under static stress conditions, two groups of intact and hole-bearing granite cores were provided and tested by a hydraulic servo control device under uniaxial compressive loading test. During the test, in addition to the stress recording, damage and deformability of the samples were recorded by using the strain gauge, acoustic emission sensor and camera. Split Hopkinson pressure bar (SHPB) test apparatus was used for doing dynamic loading test. In addition, the damage process was recorded using a high-speed camera with 10 micro-seconds interval of frame capability. The obtained results showed that the presence of cavity reduced the rock resistance up to 50% of the initial strength under static stresses. Furthermore, the cavity causes an increase in strain, which significantly reduces the elastic modulus. Dynamic tests show that rock strength can increase up to more than 4. 3 times of the initial value, depending on the loading rate. Also, the obtained images show that in case of high applied stress, shear failure is dominated and if the applied stress is significantly reduced, shear mechanism becomes to tensile mechanism.