The rock properties are related to the stress environment and dynamic disturbance during construction, and the testing-while-drilling-technique was used for evaluation of rock properties. However, the related research ignored the influences of stress environment and drilling parameters. In this study, triaxial compression tests and laboratory drilling tests under different confining stresses and drilling parameters were conducted for intact granite, and the numerical changes of drilling parameters were recorded. Then the static elastic energy and drilling specific energy (dynamic energy) of rock were calculated by using linear energy storage theory and rock breaking energy theory, respectively. According to the characteristics of energy variation, an energy analysis method based on drilling process was proposed, and the sum of static elastic energy and dynamic elastic energy was defined as the total energy. The results showed that: 1) the static elastic energy increased with the increase of confining stress, while the drilling specific energy was opposite. 2) For the same rock, the total energy was constant under the same drilling parameters. 3) The influence of drilling parameters on total energy was quantified by dynamic load influence factor. Finally, the potential application of energy analysis method in stress estimation was discussed through drilling tests.