This study numerically investigates the influence of material heterogeneity on the strength and deformation behavior and the associated microcracking process of a felsic crystalline rock using a grain‐based modeling approach in two‐dimensional Particle Flow Code. By using a heterogeneity index defined in this study, the heterogeneity induced by variation of grain size distribution can be explicitly incorporated into the numerical specimen models quantitatively. Under compressive loading, the peak strength and the elastic modulus are found to increase as the numerical model gradually changes from heterogeneous to homogeneous, i.e., a decrease of heterogeneity index. Meanwhile, the number of grain boundary tensile cracks gradually decreases and the number of intragrain cracks increases at the moment of failure. However, the total number of generated microcracks seems not to be significantly influenced by heterogeneity. The orientation of grain boundary microcracks is mainly controlled by the geometry of assembled grain structure of the numerical specimen model, while the orientation of intragrain microcracks is to a large degree influenced by the confinement. In addition, the development of intragrain cracks (both tensile and shear) is much more favored in quartz than in other minerals. Under direct tensile loading, heterogeneity is found to have no significant influence on the simulated stress‐strain responses and rock strength. Only grain boundary tensile cracks are generated when the numerical models are loaded in direct tension, and the position of generated macroscopic fracture developed upon failure of the specimen is largely affected by heterogeneity.