Ischemic stroke (IS) is a leading cause of death and disability worldwide. Screening for marker genes in IS is crucial for its early diagnosis and improvement in clinical outcomes. In the study, the gene expression profiles in the GSE22255 and GSE37587 datasets were extracted from the public database Gene Expression Omnibus. Weighted gene co‑expression network analysis (WGCNA) was used to investigate the gene sets that were related to ubiquitination. A total of 33 ubiquitination-related differentially expressed genes (DEGs) were identified using “limma (version 3.50.0)”. Gene set enrichment analysis (GSEA) and gene set variation analysis (GSVA) analysis enriched multiple pathways that were closely related to IS. The correlations between the HALLMARK signaling pathways and DGEs were analyzed. Receiver operating characteristic analysis was used to validate the diagnostic value of the key genes. Among them, 16 genes were identified as hub genes. Single-sample GSEA was performed to evaluate the infiltration status of immune cells in IS. To understand the potential molecular mechanisms of the hub genes in IS, we constructed RBP-mRNA and mRNA–miRNA–lncRNA interaction networks. Additionally, we used the GeneMANIA database to create a PPI network for the signature genes to investigate their functions. As a result, there was a significant difference in the overall infiltration of immune cells between the IS and control groups. Among the 28 types of immune cells, the degree of infiltration of seven types was significantly different between the two groups (p<0.05). The expression of four types of immune cells, namely type 1 T helper cell, type 17 T helper cell, eosinophil, and mast cell, in the IS group were significantly higher than that in the control group. The expressions of DHFR2 (R = -0.575; p<0.001) and DNAAF2 (R = -0.562; p<0.001) were significantly negatively correlated with eosinophil infiltration. The PPI network demonstrated that the 16 hub genes interacted with each other. In conclusion, we identified DEGs, WGCNA modules, hub genes, enriched pathways, and infiltrating immune cells that may be closely involved in IS. Further studies are required to explore the functions of these genes.