To investigate the origin of quartz and its effect on shale reservoirs in the Dalong Formation, we conducted a thorough analysis of shale samples using various techniques including optical microscopy, scanning electron microscopy (SEM), X-ray diffraction (XRD), low-temperature N 2 adsorption, and geochemical analysis. Our findings reveal the presence of different types of quartz in the Dalong Formation shale, namely, detrital quartz, siliceous biogenic quartz, and quartz resulting from the transformation of clay minerals (S−I quartz). The geochemical data show that the contents of TiO 2 and Al 2 O 3 in shale are low, with SiO 2 showing a negative correlation with those of TiO 2 and Al 2 O 3 . The average value of Al/(Al + Fe + Mn) was determined to be 0.66, while the average value of δ 30 Si was 0.68‰. The results indicate that the silica in the Dalong Formation shale was mainly derived from biogenic sources and was not influenced by a hot liquid. The contribution of terrestrial silica is minimal. The content of silica from different sources was quantified, with an average of 71.37% biogenic quartz, 20.22% terrigenous detrital quartz, and 8.40% S−I quartz. By investigating the pore loss mechanism and analyzing N 2 adsorption data, we discovered that biogenic quartz and S−I quartz have a significant impact on pore development in shale. Biogenic quartz acts as a rigid particle, resisting shale compaction and facilitating pore preservation. On the other hand, S−I quartz, which forms through the transformation of clay minerals, promotes further rock compaction and acts as cement, inhibiting pore development. The presence of terrestrial detrital quartz hinders the formation of mesopores in the shale.