Abstract Background Patients with congenital heart disease (CHD) are considered at lifelong high risk of infective endocarditis (IE). The risk of IE presumably differs among different types of CHD, but little knowledge exists on the area. Purpose This study set out to investigate the long-term incidence of IE among CHD-patients and associated risk factors. Methods In this observational cohort study, all patients with CHD born in 1977–2018 were identified using Danish nationwide registries and followed from date of birth until occurrence of first-time IE, emigration, death, or end of study (December 31, 2018). The comparative risk of IE among patients with CHD versus age- and sex-matched controls from the background population was assessed. Moreover, the risk of IE was stratified according to type of CHD and risk factors associated with IE among patients with CHD were examined using Cox regression analysis including sex and relevant time-varying coefficients (i.e., cyanotic yet surgically untreated CHD, CHD repaired with prostheses, diabetes mellitus, chronic kidney disease, and presence of cardiac implantable devices). Results A total of 23,464 patients with CHD (50.0% men) were identified and matched with 93,856 controls from the background population. During a median follow-up of 17.7 years, 217 (0.9%) patients with CHD and 4 (0.0%) controls developed IE, corresponding to incidence rates of 5.2 (95% CI: 4.6–6.0) and 0.02 (95% CI: 0.01–0.1) per 10,000 person-years, respectively. The associated incidence of IE was greatest among patients with tetralogy of Fallot, malformations of the heart chambers (including transposition of the great arteries and truncus arteriosus), atrioventricular septal defects, and heart valve defects (Figure 1). Factors associated with IE among patients with CHD included male sex (HR 1.7 [95% CI, 1.3–2.2]), cyanotic yet surgically untreated CHD (HR 5.2 [95% CI, 3.5–7.7]), cardiac prostheses (HR 5.2 [95% CI, 3.6–7.5]), chronic kidney disease (HR 3.1 [95% CI, 1.3–7.6]), and presence of cardiac implantable electronic devices (HR 3.1 [95% CI, 1.5–6.2]). Conclusions Patients with CHD, especially those with tetralogy of Fallot and malformations of the heart chambers, have a substantially higher incidence of IE than the background population. With an increasing longevity of these patients, relevant guidelines concerning preventive measures are decisive to improve morbidity, mortality, and the quality of life among this growing group of patients. Funding Acknowledgement Type of funding sources: None.