Periodontitis is an inflammatory and immune-related disease with links to several systemic diseases, and the pathological process of atherosclerosis also involves inflammatory and immune involvement. The aim of this study was to investigate the common immune cells and potential crosstalk genes between periodontitis (PD) and atherosclerosis (AS). By analyzing the weighted gene co-expression network of differentially immune infiltrating cells in two diseases to obtain important module genes, and taking the intersection of the module genes, we obtained 14 co-expressed immune-related genes, and evaluated the predictive value of 14 immune-related genes using three machine learning models.Two potential immune-related crosstalk genes (BTKandITGAL) were finally obtained by taking intersections of WGCNA intersection genes, DEGs and IRGs.Then, the diagnostic column line graphs were constructed based on the 2 crosstalk genes, and the calibration curves, DCA curves and clinical impact curves indicated that the two genes had strong disease prediction ability, and we further validated the accuracy of the two potential crosstalk genes for disease diagnosis in the validation dataset.Single gene GSEA analysis showed that both genes are jointly involved in biological processes such as antigen presentation and immune regulation, and single sample GSEA analysis showed that macrophages and T cells play an important role in periodontitis in atherosclerosis.This study explored the genetic correlation between atherosclerosis and periodontitis using bioinformatics tools.BTKandITGALwere found to be the most important crosstalk genes between the two diseases and may have an important role in the diagnosis and treatment of the diseases. Macrophage and T cell mediated inflammatory and immune responses may play an important role in periodontitis and atherosclerosis.