Background Protein glycosylation plays an important role in various biological processes, and abnormal glycosylation is often linked with many diseases. This study aimed to investigate the potential value of glycosyltransferase genes (GTGs) in the diagnosis of T-cell mediated rejection (TCMR) and the prediction of graft loss in kidney transplantation.Methods We downloaded the microarray datasets and GTs from the GEO database and the HUGO Gene Nomenclature Committee (HGNC) database, respectively. Differentially expressed GTGs (DE-GTGs) were obtained by differential expression analysis and Venn analyses. LASSO and XGboost machine learning algorithms were applied to screen hub DE-GTGs, and a TCMR diagnostic model was established based on the hub DE-GTGs. Furthermore, we constructed a long-term graft survival predictive model by univariate Cox analysis and LASSO Cox regression analysis.Results 15 DE-GTGs were obtained. GO and KEGG analyses showed that the DE-GTGs were mainly involved in the glycoprotein biosynthetic process. The TCMR diagnostic model exhibited high diagnostic potential with generally high accuracies (an AUC of 0.833). The immune characteristics analysis revealed that higher levels of immune cell infiltration and immune responses were observed in the high-risk group than in the low-risk group. Furthermore, a predictive model for long‑term graft survival was established. Kaplan-Meier survival analysis suggested that renal grafts in the high-risk group have worse prognostic outcomes than the low-risk group. AUC values of 1-, 2- and 3-year graft survival were 0.76, 0.81, and 0.70, respectively.Conclusion Our results indicate that GTGs not only play an important role in renal graft rejection but also could be used for diagnosing TCMR. Furthermore, GTGs could be applied to predict long-term renal graft outcomes. These results offer novel schemes for assessing kidney transplant diseases and provide a valuable direction for future research.