To study the effect of the non-uniform distribution of minerals on the development of microcracks within the rock during hydraulic fracturing, a novel numerical model considering multiple random mineral distributions was designed. The model investigated the impacts of mineral grain size, composition, and spatial arrangement on fracture initiation and propagation. The results indicate that the presence of the hard-phase mineral quartz can alter the propagation path of fractures, and increase the width of hydraulic fractures. In coarse-grained granite, the range of crack deflection is maximized, while in medium-grained granite, it is more prone to forming convoluted elongated cracks. A higher quartz content in granite further contributes to the formation of complex crack networks. Simultaneously, the evolution of granite fractures and variations in breakdown pressure in heterogeneous granite were investigated, considering the influence of core parameters such as fluid injection rate, fracturing fluid viscosity, and horizontal stress difference. The research reveals that a high injection rate promotes straight-line fracture expansion. Moreover, modest fluctuations in fracturing fluid viscosity have minimal effects on fracture morphology. When the fracture development avoids quartz, under the influence of high horizontal stress differential, it clearly turns toward the direction of the maximum principal stress. This study can offer insights into innovative and optimized deep reservoir fracturing techniques.