A modified fluid-mechanically coupled algorithm in PFC 2D was adopted in this article to study the influence of grain size heterogeneity and in-situ stress on hydraulic fracturing behavior. Simulated results showed that the in-situ stress and grain size heterogeneity significantly affect the initiation, growth, and spatial distribution of the hydraulic fractures: (1) the initiation and breakdown pressure are gradually reduced with the increase of the grain size heterogeneity; (2) with increased in-situ stress, the initiation and breakdown pressure increase, and the reduction effect of grain size heterogeneity on the breakdown pressure becomes more obvious; (3) in grain size homogeneous rock, the initiation pressure decreases with increasing in-situ stress ratio, however, the initiation pressure of grain size heterogeneous rock is almost unaffected by the in-situ stress ratio; (4) The in-situ stress ratio and grain size heterogeneity affect the spatial distribution of hydraulic fractures simultaneously. When the in-situ stress ratio is larger than 1, the hydraulic fractures propagate substantially along the direction of the maximum principal stress. When the in-situ stress ratio is 1, the initiation position and extension direction of hydraulic fractures are random and complex fracture networks can easily develop in a grain size homogeneous model.