With the increasing attention to clean and economical energy resources, geothermal energy and enhanced geothermal systems (EGS) have gained much importance. For the efficient development of deep geothermal reservoirs, it is crucial to understand the mechanical behavior of reservoir rock and its interaction with injected fluid under high temperature and high confining pressure environments. In the present study, we develop a novel numerical scheme based on the distinct element method (DEM) to simulate the failure behavior of rock by considering the influence of thermal stress cracks and high confining pressure for EGS. We validated the proposing method by comparing our numerical results with experimental laboratory results of uniaxial compression tests under various temperatures and biaxial compression tests under different confining pressure regarding failure patterns and stress-strain curves. We then apply the developed scheme to the hydraulic fracturing simulations under various temperatures, confining pressure, and injection fluid conditions. Our numerical results indicate that the number of hydraulic cracks is proportional to the temperature. At a high temperature and low confining pressure environment, a complex crack network with large crack width can be observed, whereas the generation of the micro cracks is suppressed in high confining pressure conditions. In addition, high-viscosity injection fluid tends to induce more hydraulic fractures. Since the fracture network in the geothermal reservoir is an essential factor for the efficient production of geothermal energy, the combination of the above factors should be considered in hydraulic fracturing treatment in EGS.