The Middle Jurassic in the western Sichuan Province is typically a red clastic bed without hydrocarbon generation capacity. The source rock of the gas pool is 1 000~3 000 m underlain Xujiahe Formation, which makes the Upper Shaximiao Formation a distal gas pool. Secondary porosity that was created dominantly by the dissolution of feldspar grains was markedly developed in the reservoir sandstone and has greatly enhanced the tight sandstone reservoir property. Secondary porosity made much higher contribution to reservoir than primary porosity. It accounts for proximately 60% of thin-section point counted porosity. The second source is a result of reaction of oxidant in the reservoir sandstone with hydrocarbon transported from deep beds, and the less important third source comes from dehydration process of the mudrock of the Shaximiao Formation.