BackgroundPolymyositis (PM) is an acquirable muscle disease with proximal muscle involvement of the extremities as the main manifestation; it is a category of idiopathic inflammatory myopathy. This study aimed to identify the key biomarkers of PM, while elucidating PM-associated immune cell infiltration and immune-related pathways.MethodsThe gene microarray data related to PM were downloaded from the Gene Expression Omnibus database. The analyses using Gene Ontology (GO), Kyoto Encyclopedia of Genes and Genomes, gene set enrichment analysis (GSEA), and protein-protein interaction (PPI) networks were performed on differentially expressed genes (DEGs). The hub genes of PM were identified using weighted gene co-expression network analysis (WGCNA) and least absolute shrinkage and selection operator (LASSO) algorithm, and the diagnostic accuracy of hub markers for PM was assessed using the receiver operating characteristic curve. In addition, the level of infiltration of 28 immune cells in PM and their interrelationship with hub genes were analyzed using single-sample GSEA.ResultsA total of 420 DEGs were identified. The biological functions and signaling pathways closely associated with PM were inflammatory and immune processes. A series of four expression modules were obtained by WGCNA analysis, with the turquoise module having the highest correlation with PM; 196 crossover genes were obtained by combining DEGs. Subsequently, six hub genes were finally identified as the potential biomarkers of PM using LASSO algorithm and validation set verification analysis. In the immune cell infiltration analysis, the infiltration of T lymphocytes and subpopulations, dendritic cells, macrophages, and natural killer cells was more significant in the PM.ConclusionWe identified the hub genes closely related to PM using WGCNA combined with LASSO algorithm, which helped clarify the molecular mechanism of PM development and might have great significance for finding new immunotherapeutic targets, and disease prevention and treatment.