Polycystic Ovary Syndrome (PCOS) is a common endocrine disorder that negatively affects female reproductive capacity. Although the association between autophagy and PCOS is known, there are few detailed studies on the association between autophagy-related genes and PCOS. Publicly available gene expression datasets (GSE102293, GSE138518, GSE34526, GSE114419, GSE137684, GSE155489) were used in a comprehensive analysis to identify a role for autophagy in PCOS. Batch effects were mitigated using the sva package, followed by WGCNA (weighted gene correlation network analysis) and ss- GSEA (single sample gene set enrichment analysis) to identify autophagy-related genes. Recursive feature elimination (RFE) and LASSO COX methods were used to identify important hub genes, and their correlation with immune cell activity was assessed using ssGSEA and Pearson correlation analysis. High autophagy scores were observed in PCOS samples, and the dark green gene module with the highest autophagy correlation was identified. The differential analysis identified a total of 169 up-regulated genes versus 2 down-regulated genes in the PCOS samples, which were intersected by taking the intersection with the deep green module genes and resulted in 121 key genes. Subsequently, 6 hub genes (MMP25, CSF3R, SLPI, MMP9, CLEC4E, and SIGLEC10) were further identified based on RFE and LASSO algorithms. Diagnostic efficacy based on ROC curves showed six autophagy- associated hub genes with AUC values as high as 0.959 and 0.896 in the training and validation sets, respectively. Finally, we observed that these hub genes are strongly associated with immune function, especially chronic inflammation and aberrant immune activation pathways. In this study, we identified autophagy genes closely related to PCOS and constructed a gene model with high diagnostic accuracy. These findings not only provided potential new biomarkers for the diagnosis of PCOS but also revealed the key role of autophagy in the pathogenesis of PCOS.