A grain-based Universal Distinct Element Code model was developed to generate a deformable polygonal grain-like structure to simulate the microstructure of brittle rock. It takes into account grain-scale heterogeneity including microgeometric heterogeneity, grain-scale elastic heterogeneity, and microcontact heterogeneity. The microgeometric heterogeneity can be used to match the grain size distribution of the rock. The discrete element approach is able to simulate the microheterogeneity caused by elastic variation and contact stiffness anisotropy. The modeling approach was evaluated using Lac du Bonnet granite and Äspö Diorite. The microheterogeneity played an important role in controlling both the micromechanical behavior and the macroscopic response when subjected to uniaxial compression loading. The crack-initiation stress was found to be controlled primarily by the microscale geometric heterogeneity, while the microcontact heterogeneity controlled the strength characteristics. The effect of heterogeneity on the distribution and evolution of tensile stresses and associated extension cracks was also examined.