Patients with congenital heart disease (CHD), the most common birth defect, have increased risks for cancer. Identification of the variables that contribute to cancer risk is essential for recognizing patients with CHD who warrant longitudinal surveillance and early interventions. To compare the frequency of damaging variants in cancer risk genes among patients with CHD and control participants and identify associated clinical variables in patients with CHD who have cancer risk variants. This multicenter case-control study included participants with CHD who had previously been recruited to the Pediatric Cardiac Genomics Consortium based on presence of structural cardiac anomaly without genetic diagnosis at the time of enrollment. Permission to use published sequencing data from unaffected adult participants was obtained from 2 parent studies. Data were collected for this study from December 2010 to April 2019. Presence of rare (allele frequency, <1 × 10-5) loss-of-function (LoF) variants in cancer risk genes. Frequency of LoF variants in cancer risk genes (defined in the Catalogue of Somatic Mutations in Cancer-Cancer Gene Consensus database), were statistically assessed by binomial tests in patients with CHD and control participants. A total of 4443 individuals with CHD (mean [range] age, 13.0 [0-84] years; 2225 of 3771 with reported sex [59.0%] male) and 9808 control participants (mean [range] age, 52.1 [1-92] years; 4967 of 9808 [50.6%] male) were included. The frequency of LoF variants in regulatory cancer risk genes was significantly higher in patients with CHD than control participants (143 of 4443 [3.2%] vs 166 of 9808 [1.7%]; odds ratio [OR], 1.93 [95% CI, 1.54-2.42]; P = 1.38 × 10-12), and among CHD genes previously associated with cancer risk (58 of 4443 [1.3%] vs 18 of 9808 [0.18%]; OR, 7.2 [95% CI, 4.2-12.2]; P < 2.2 × 10-16). The LoF variants were also nominally increased in 14 constrained cancer risk genes with high expression in the developing heart. Seven of these genes (ARHGEF12, CTNNB1, LPP, MLLT4, PTEN, TCF12, and TFRC) harbored LoF variants in multiple patients with unexplained CHD. The highest rates for LoF variants in cancer risk genes occurred in patients with CHD and extracardiac anomalies (248 of 1482 individuals [16.7%]; control: 1099 of 9808 individuals [11.2%]; OR, 1.59 [95% CI, 1.37-1.85]; P = 1.3 × 10-10) and/or neurodevelopmental delay (209 of 1393 individuals [15.0%]; control: 1099 of 9808 individuals [11.2%]; OR, 1.40 [95% CI, 1.19-1.64]; P = 9.6 × 10-6). Genotypes of CHD may account for increased cancer risks. In this cohort, damaging variants were prominent in the 216 genes that predominantly encode regulatory proteins. Consistent with their fundamental developmental functions, patients with CHD and damaging variants in these genes often had extracardiac manifestations. These data may also implicate cancer risk genes that are repeatedly varied in patients with unexplained CHD as CHD genes.