The 4th member of Xujiahe Formation (Xu4) in the western Sichuan Depression is a typical porous tight sandstone reservoir. Finding reservoirs with relatively high porosity controlled by sedimentation and diagenesis is crucial for successful tight gas exploration. In this study, the Xu4 sandstone was studied by diverse methods, including outcrop and core observation, logging data interpretation, thin section and cathodoluminescence examination, scanning electron microscopy analysis, and X-ray diffraction, to determine sedimentary and diagenetic characteristics and to discuss their impact on the sandstone reservoir quality. During the depositional period of Xu4, subaqueous distributary channel sandstone of braided river delta front developed extensively under controls of bidirectional provenance (LASP and SASP), mainly consisting of litharenite and sublitharenite, with low feldspar and high rock fragments volume, respectively. Strong compaction and carbonate cementation have largely destroyed primary porosity, while secondary pores constitute the main pore space in the Xu4 sandstone. The sediment provenance, sedimentary microfacies and A/S determine the clastic composition of sandstone, genetic type and thickness of sand bodies, furthermore affect the subsequent diagenetic variations. The larger the thickness of the sand body indicates a higher-energy depositional environment, coarser grain size, better sorting, and lower shaliness content of the sandstone during deposition period. This results in stronger resistance to compaction of the sandstone, which is conducive to the preservation of primary pores and dissolution of organic acids, resulting in better physical properties of sandstone. Among them, the physical properties of the sandstones of the Xu4s and Xu4x are better than those of the Xu4z; moreover, LASP's sandstone is superior to SASP. It is worth noting that subaqueous distributary channel sandstones with thickness exceeding 13 m in Xu4s and Xu4x from LASP represent favorable areas for high-quality reservoirs. The work can be used as a reference for the exploration and evaluation of similar tight sandstone gas in the world.