N6-methyladenosine (m6A) modifications play an important role in the differentiation and regulation of immune cells. However, research on m6A in ischemic stroke (IS) is still in its infancy, and their role of the immune microenvironment remains unknown. In this study, we systematically assessed the modification classes of m6A regulators in IS based on the GEO database (GSE16561 and GSE22255). We found that in IS patients, IGF2BP2, IGF2BP1, and YTHDF2 expression was significantly upregulated, and ELAVL1, LRPPRC, METTL3, ALKBH5, CBLL1, and METTL14 expression was significantly downregulated. Seven IS-related genes (ELAVL1, IGF2BP2, LRPPRC, YTHDF2, ALKBH5, METTL14, and YTHDC1) were finally screened by logistic and least absolute shrinkage and selection operator (LASSO) regressions, and the AUC of the riskScore was 0.942, which was a good classification. For immune infiltration, there were highly significant differences in memory B cells, CD8 T cells, monocytes, activated dendritic cells, and mast cells between IS and normal samples. The IS samples were grouped into three classes by consistent clustering, and 15 m6A genes were differentially expressed in the different classes. Multiple infiltrating immune cells, immune-associated genes, and HLA-associated genes differed significantly across m6A modification classes, indicating the diversity and complexity of m6A modifications in the immune microenvironment of IS. Finally, 487 genes associated with the m6A modification class were identified, and 227 potential drugs were found. Our findings demonstrated that m6A modification plays a crucial role in the immune regulation of IS.