The Lower Jurassic Ahe Formation is an important exploration target for deep clastic reservoirs in the eastern Kuqa Depression. The Ahe Formation sandstones show heterogeneous porosity and permeability petrophysical properties. These properties have been poorly understood, limiting forecast of petroleum accumulations and making it difficult to develop the reservoirs. Based on cores, thin sections, SEM, and fluid inclusions, this study examined sandstone composition and texture and diagenetic heterogeneity at the core scale. The aim was to understand the influence of variations in detrital composition and texture on diagenetic and reservoir quality evolution. The Ahe Formation sandstones are dominantly fine- to coarse-grained litharenites, with minor feldspathic litharenites. In fining-up sand beds, detrital grain size determines the degree of mechanical compaction and, consequently, the abundance of porosity through ductile grains and muddy matrix. Local complete calcite cementation is a noticeable exception to this general trend. Three sandstone petrofacies have been defined based on texture and framework composition, detrital matrix, diagenesis, and pore types: (1) ductile-lean sandstone, (2) ductile-rich sandstone, and (3) tightly calcite-cemented sandstone. Different petrofacies experienced contrasting diagenetic and porosity evolution pathways. Ductile-lean sandstones underwent lower degree of compaction relative to ductile-rich sandstones during the eodiagenesis stage, and extensive grain dissolution occurred. The petrofacies remained relatively porous and permeable before early oil arrival. With continued burial, the porosity and permeability in the sandstones were further reduced by cementation. The petrofacies still had moderate porosity and permeability and were substantially charged when late petroleum migrated into the reservoirs. Thus, ductile-lean sandstones constitute effective reservoir rocks in deep reservoirs. By translating petrofacies to signatures of well logs, the effective properties of the reservoir rocks can be forecasted at the well scale.