Cardiopulmonary bypass (CPB), though indispensable in many cardiac surgery procedures, has several undesirable consequences. The aim of this study was to identify potential genes that may reduce the inflammatory response and complications after CPB. The GSE132176 dataset was selected from the Gene Expression Omnibus (GEO) database and included 10 patients with tetralogy of Fallot and 10 patients with an atrial septal defect who underwent CPB surgery. TSV files were downloaded after GEO2R processing. Protein-protein interaction analysis of common differentially expressed genes (DEGs) was performed using the Search Tool for the Retrieval of Interacting Genes. Gene modules and hub genes were visualized in the protein-protein interaction network using Cytoscape. Enrichment analysis was performed for all important DEGs, modular genes, and hub genes. A total of 72 DEGs were screened, including two functional and one hub gene module. FOS modular genes were primarily enriched in NGF-stimulated transcription, spinal cord injury, and PID AP1 pathway. The ATF3 modular gene was mainly enriched in cytomegalovirus infection and transcriptional misregulation in cancer. Hub gene modules were primarily enriched in the PID AP1 pathway, positive regulation of pri-miRNA transcription by RNA polymerase II, and the PID ATF2 pathway. FOS, JUN, ATF3, and EGR1 were the four most important hub genes; the top three hub genes were involved in the formation of AP-1 and enriched in the AP-1 pathway. Finally, we measured the expression levels of these four genes in patients undergoing CPB via qRT-PCR, and the results were consistent with those obtained in bioinformatic analysis. FOS, JUN, ATF3, and EGR1 and the AP-1 pathway may play key roles in inflammation and complications caused by CPB.