Emerging evidence shows that carotid atherosclerosis is related to the activation of immune-related pathways and inflammatory cell infiltration. However, the immune-linked pathways that helped in the advancement of the carotid atherosclerotic plaque and the association of such plaques with the infiltration status of the body’s immune cells still unclear. Here, the expression profiles of the genes expressed during the progression of the carotid atherosclerotic plaques, were retrieved from the Gene Expression Omnibus database and 178 differentially expressed genes were examined. The Weighted Gene Co-expression Network Analysis technique identified one of the brown modules showed the greatest correlation with carotid atherosclerotic plaques. In total, 66 intersecting genes could be detected after combining the DEGs. LASSO regression analysis was subsequently performed to obtain five hub genes as potential biomarkers for carotid atherosclerotic plaques. The functional analysis emphasized the vital roles played by the inflammation- and immune system-related pathways in this disease. The immune cell infiltration results highlighted the significant correlation among the CD4+ T cells, B cells, macrophages, and CD8+ T cells. Thereafter, the gene expression levels and the diagnostic values related to every hub gene were further validated. The above results indicated that macrophages, B cells, CD4+ T cells, and CD8+T cells were closely related to the formation of the advanced-stage carotid atherosclerotic plaques. Based on the results, it could be hypothesized that the expression of hub genes (C3AR1, SLAMF8, TMEM176A, FERMT3, and GIMAP4) assisted in the advancement of the early-stage to advanced-stage carotid atherosclerotic plaque through immune-related signaling pathways.