Tight sandstone has low porosity and permeability, a complex pore structure, and strong heterogeneity due to strong diagenetic modifications. Limited intervals of Lianggaoshan Formation in the Fuling area are cored due to high costs, thus, a model for predicting diagenetic facies based on logging curves was established based on few core, thin section, X-ray diffraction (XRD), scanning electron microscopy (SEM), cathodoluminescence, routine core analysis, and mercury injection capillary pressure tests. The results show that tight sandstone in the Lianggaoshan Formation has primary and secondary intergranular pores, secondary intragranular pores, and intergranular micropores in the clay minerals. The compaction experienced by sandstone is medium to strong, and the main diagenetic minerals are carbonates (calcite, dolomite, and ferric dolomite) and clay minerals (chlorite, illite, and mixed illite/montmorillonite). Four types of diagenetic facies are recognized: carbonate cemented (CCF), tightly compacted (TCF), chlorite coating and clay mineral filling (CCCMFF), and dissolution facies (DF). Primary pores develop in the CCCMFF, and secondary pores develop in the DF; The porosities and permeabilities of CCCMFF and DF are better than that of CCF and TCF. The diagenetic facies were converted to logging data, and a diagenetic facies prediction model using four machine learning methods was established. The prediction results show that the random forest model has the highest prediction accuracy of 97.5%, followed by back propagation neural networks (BPNN), decision trees, and K-Nearest Neighbor (KNN). In addition, the random forest model had the smallest accuracy difference between the different diagenetic facies (2.86%). Compared with the other three machine learning models, the random forest model can balance unbalanced sample data and improve the prediction accuracy for the tight sandstone of the Lianggaoshan Formation in the Fuling area, which has a wide application range. It is worth noting that the BPNN may be more advantageous in diagenetic facies prediction when there are more sample data and diagenetic facies types.