Objective To identify inflammation-related genes in atrial fibrillation(AF)and explore the possible role and mechanism of these genes and infiltrating immune cells in the development of AF.Methods A series of bioinformatics analysis combined with machine learning algorithms to identify biomarkers of AF,the receiver operating characteristic(ROC)curves were used to verify the prediction and diagnostic value of key genes,and Spearman correlation analysis was used to clarify the correlation between key genes and infiltrating immune cells.Results 593 differential genes(| log2(fold change,FC)|>1,P<0.05),7 immune cell subtypes(P<0.05)were selected,190 immune-related differential genes were obtained,3 biomarkers(IGF1,PTGS 2 and PPARG),and the correlation analysis showed that 3 markers were significantly associated with infiltrating immune cells(P<0.05).Conclusion IGF1,PTGS2 and PPARG are inflammation-related genes of AF,which are speculated to be closely related to the process and pathway of immune cell infiltration.