Objective. To screen for potential endoplasmic reticulum stress- (ERS-) related biomarkers of periodontitis using machine learning methods and explore their relationship with immune cells. Methods. Three datasets of periodontitis (GSE10334, GES16134, and GES23586) were obtained from the Gene Expression Omnibus (GEO), and the samples were randomly assigned to the training set or the validation set. ERS-related differentially expressed genes (DEGs) between periodontitis and healthy periodontal tissues were screened and analyzed for GO, KEGG, and DO enrichment. Key DEGs were screened by two machine learning algorithms, LASSO regression and support vector machine-recursive feature elimination (SVM-RFE); then, the potential biomarkers were identified through validation. The infiltration of immune cells of periodontitis was calculated using the CIBERSORT algorithm, and the correlation between immune cells and potential biomarkers was specifically analyzed through the Spearman method. Results. We obtained 36 ERS-related DEGs of periodontitis from the training set, from which 11 key DEGs were screened by further machine learning. SERPINA1, ERLEC1, and VWF showed high diagnostic values (
AUC
>
0.85
), so they were considered as potential biomarkers for periodontitis. According to the results of the immune cell infiltration analysis, these three potential biomarkers showed marked correlations with plasma cells, neutrophils, resting dendritic cells, resting mast cells, and follicular helper T cells. Conclusions. Three ERS-related genes, SERPINA1, ERLEC1, and VWF, showed valuable biomarker potential for periodontitis, which provide a target base for future studies on early diagnosis and treatment of periodontitis.