In this study, an integrated approach for diagenetic facies classification, reservoir quality analysis and quantitative wireline log prediction of tight gas sandstones (TGSs) is introduced utilizing a combination of fit-for-purpose complementary testing and machine learning techniques. The integrated approach is specialized for the middle Permian Shihezi Formation TGSs in the northeastern Ordos Basin, where operators often face significant drilling uncertainty and increased exploration risks due to low porosities and micro-Darcy range permeabilities. In this study, detrital compositions and diagenetic minerals and their pore type assemblages were analyzed using optical light microscopy, cathodoluminescence, standard scanning electron microscopy, and X-ray diffraction. Different types of diagenetic facies were delineated on this basis to capture the characteristic rock properties of the TGSs in the target formation. A combination of He porosity and permeability measurements, mercury intrusion capillary pressure and nuclear magnetic resonance data was used to analyze the mechanism of heterogeneous TGS reservoirs. We found that the type, size and proportion of pores considerably varied between diagenetic facies due to differences in the initial depositional attributes and subsequent diagenetic alterations; these differences affected the size, distribution and connectivity of the pore network and varied the reservoir quality. Five types of diagenetic facies were classified: (ⅰ) grain-coating facies, which have minimal ductile grains, chlorite coatings that inhibit quartz overgrowths, large intergranular pores that dominate the pore network, the best pore structure and the greatest reservoir quality; (ⅱ) quartz-cemented facies, which exhibit strong quartz overgrowths, intergranular porosity and a pore size decrease, resulting in the deterioration of the pore structure and reservoir quality; (ⅲ) mixed-cemented facies, in which the cementation of various authigenic minerals increases the micropores, resulting in a poor pore structure and reservoir quality; (ⅳ) carbonate-cemented facies and (ⅴ) tightly compacted facies, in which the intergranular pores are filled with carbonate cement and ductile grains; thus, the pore network mainly consists of micropores with small pore throat sizes, and the pore structure and reservoir quality are the worst. The grain-coating facies with the best reservoir properties are more likely to have high gas productivity and are the primary targets for exploration and development. The diagenetic facies were then translated into wireline log expressions (conventional and NMR logging). Finally, a wireline log quantitative prediction model of TGSs using convolutional neural network machine learning algorithms was established to successfully classify the different diagenetic facies.