The Jurassic Shaximiao Formation in the Sichuan Basin represents a significant tight gas reservoir, exhibiting marked permeability variations between the southern and northern regions of western Sichuan. This study examines the reservoir characteristics of the Shaximiao Formation, with a focus on the evolution of sandstone porosity under bidirectional provenance conditions and the underlying causes of permeability variations. The insights derived from this research are critical for the effective exploration and development of tight sandstone gas reservoirs. Analysis of core samples and thin sections through X-ray diffraction, cathodoluminescence, scanning electron microscopy, and electron probe microanalysis reveals that the southern region predominantly consists of feldspathic and lithic sandstone, whereas the northern region is characterized by feldspathic lithic and lithic feldspathic sandstone. The average porosity and permeability in the southern region are 10.52% and 0.1334 × 10−3 μm2, respectively, while in the northern region, they are 9.74% and 0.5262 × 10−3 μm2. The primary reservoir spaces are intergranular primary pores and intragranular secondary dissolution pores. Compaction significantly reduces porosity, particularly in the northern region (23.94%) compared to the southern region (22.75%), primarily due to the presence of chlorite coatings. Cementation further reduces porosity, whereas dissolution processes enhance it, elucidating the similar porosity values but differing permeabilities between the regions.