Evidence from past research has shown that DNA methylation plays a key role in the pathogenesis of periodontitis, regulating gene expression levels and thereby affecting the occurrence of various diseases. Three sample sets of methylation data and gene expression data were downloaded from Gene Expression Omnibus (GEO) database. A diagnostic classifier is established based on gene expression data and CpG methylation data. Abnormal expression of immune-related pathways and methyltransferase-related genes in patients with periodontitis was detected. A total of 8,029 differentially expressed CpG (DMP) was annotated to the promoter region of 4,940 genes, of which 295 immune genes were significantly enriched. The CpG sites of 23 differentially co-expressed immune gene promoter regions were identified, and 13 CpG were generally hypermethylated in healthy group samples, while some were methylated in most patients. Five CpGs were screened as robust periodontitis biomarkers. The accuracy in the training data set, the two external verification data sets, and in the transcriptome was 95.5%, 80% and 78.3%, and 82.6%, respectively. This study provided new features for the diagnosis of periodontitis, and contributed to the personalized treatment of periodontitis.