BackgroundThyroid‐associated ophthalmopathy (TAO) is one of the most complex autoimmune diseases in endocrinology areas. Autophagy‐related genes may be involved in the pathophysiology of TAO. This study aims to reveal key genes associated with autophagy in the pathogenesis and the potential diagnostic markers for TAO.MethodsWe obtained autophagy‐related differential genes (AR‐DEGs) and their expression in TAO patients and controls. Gene ontology analysis (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analysis were used to perform the enrichment analysis of AR‐DEGs. LASSO regression, support vector machine recursive feature elimination, and random forest were performed to screen for disease signature genes (DSGs), which were further validated in another independent validation dataset. We used the receiver operating characteristic for the evaluation of the diagnostic efficacy of DSGs and also established a nomogram. The relative proportion of immune infiltration was calculated using the CIBERSORT algorithm, and the relationship between the identified gene markers and the level of infiltrating immune cells was explored.ResultsWe identified 24 AR‐DEGs, which were primarily enriched in cellular catabolic regulation, autophagosome membrane, and ubiquitin protein ligase binding in GO analysis, while KEGG analysis highlighted autophagy as the main enriched pathway. Six DSGs were identified by three algorithms. They were validated in another independent validation dataset. The combined six‐gene model also showed good diagnostic efficacy (AUC = 0.948). We further plotted the nomogram with better diagnostic efficacy. Immuno‐infiltration analysis and correlation analysis demonstrated that six DSGs were significantly correlated with the infiltrating immune cells.ConclusionsWe identified several biological processes and pathways for the enrichment of AR‐DEGs. Six DSGs were identified, which showed great potential to become critical molecules in the diagnosis of TAO, and these DSGs showed a correlation with infiltrating immune cells.