Atrial fibrillation (AF) is always in high incidence in the population, which can lead to serious complications. The structural and electrical remodeling of atrial muscle induced by inflammatory reaction or oxidative stress was considered as the major mechanism of AF. The treatment effect is not ideal based on current mechanisms. Recent studies demonstrated that lipid metabolism disorder of atrial muscle played an important role in the occurrence of AF. What key genes are involved is unclear. The purpose of the present study was to explore the lipid metabolism mechanism of AF. With the GEO database and the genomics of AF patients, metabolic related pathways and the key genes were analyzed. At the same time, the rat model of cecal ligation and puncture (CLP) was used to confirm the results. GSE 31821 and GSE 41177 were used as data sources, and the merged differentially expressed genes (DEGs) analysis showed that a total of 272 DEGs were found. GO annotation, KEGG, and gene set enrichment analysis (GSEA) showed that the fatty acid metabolism and the lipid biosynthetic process were involved in AF. Cholesterol biosynthesis, arachidonic acid metabolism, and the lipid droplet pathway were obviously increased in AF. Further analysis showed that four key genes, including ITGB1, HSP90AA1, CCND1, and HSPA8 participated in pathogenesis of AF regulating lipid biosynthesis. In CLP rats, metabolic profiling in the heart showed that the pyrimidine metabolism, the biosynthesis of unsaturated fatty acid metabolism, arginine and proline metabolism, and the fatty acid biosynthesis were involved. The four key genes were confirmed increased in the heart of CLP rats (p < 0.05 or 0.01). The results suggest that the lipid metabolism disorder participates in the occurrence of AF. ITGB1, HSP90AA1, CCND1, and HSPA8 are the key genes involved in the regulation of lipid biosynthesis.