The compaction and grain crushing (GC) of deep-buried sandstone reservoirs play a crucial role in the evolution of reservoir quality. Significant differences exist in the compaction behavior and pore preservation of reservoirs with varying sedimentary grain size characteristics. However, there is a lack of quantitative assessments and mechanistic studies of these processes. This study utilizes the Discrete Element Method (DEM) to simulate two groups of samples with different grain size distributions (GSD) to explore the processes of compaction and pore preservation. Group A samples exhibit a unimodal Gaussian GSD, with the median grain size (Md) gradually increasing, while Group B samples share the same Md but differ in GSD type. The results indicate that with increasing stress, the samples undergo three compaction stages: grain rearrangement (S1), intense GC and rearrangement (S2), and weak GC and rearrangement (S3). In S1, grains rearrange with minimal sliding and no GC, resulting in a low porosity loss rate (Delta phi/Delta sigma). In S2, GC intensifies, with fragments sliding and filling the pores between grains, leading to a significant increase in Delta phi/Delta sigma. In S3, a high coordination number reduces GC, and small pores restrict the movement of fragments, resulting in a decrease in Delta phi/Delta sigma. Md has no effect on Delta phi/Delta sigma in S1. However, samples with smaller Md experience weaker GC and have smaller pore size, making it more difficult for fragments to fill the pores during S2. In S3, samples with larger Md have higher coordination numbers, providing stronger buffering against GC and resulting in lower Delta phi/Delta sigma. Additionally, GSD does not affect Delta phi/Delta sigma during S1. In S2, sample with a coarse-skewed bimodal Gaussian GSD exhibited the weaker GC, smaller difference between pore size and fragment size, resulting in a relatively low Delta phi/Delta sigma. Therefore, under deep burial conditions, sandstone with small grain size and coarse-skewed bimodal GSD demonstrates strong resistance to compaction and effective pore preservation.