Aging is a key risk factor for atherosclerosis (AS). However, its complex etiology and pathological mechanism are still unclear. At present, the study of cell senescence in AS has attracted wide attention, and the characteristics of immunity have also attracted more and more attention of scholars. Therefore, based on the strategy of combining bioinformatics, machine learning and single cell data analysis, this study screened out hub genes, and explored the correlation between aging and immune characteristics in atherosclerosis disease, to clarify the potential pathological mechanism of AS and explore new treatment strategies for AS. This study aims to identify and verify hub genes related to atherosclerosis by using bioinformatics analysis methods. First of all, through the intersection of the most relevant modules of Limma test and weighted correlation network analysis (WGCNA), the differentially expressed genes associated with atherosclerosis (ASDEGs) were identified. Secondly, the differential genes were extracted from 125 aging genes to classify the atherosclerotic samples, and the immune-related information was analyzed. Then, five characteristic genes, including HSPB7, MYEF2, DUSP26, TC2N and PLN, are identified by machine learning methods of support vector machine (SVM), random forest (RF), eXtreme gradient boosting (XGB) and generalized linear model (GLM). Finally, the expression of five hub genes was verified by single cell data analysis. To sum up, this study suggests that HSPB7, MYEF2, DUSP26, TC2N and PLN may play an important role in the pathological mechanism of AS, and aging may also be closely related to the influence of atherosclerotic immune microenvironment. Exploring the molecular mechanism of these hub genes and the differences of aging and different subtypes of immune cells are expected to bring new breakthroughs in the diagnosis and treatment of diseases.