Background: In a 6-year, multicenter, prospective nested case-control study, we aimed to evaluate risk factors for incident cancer in inflammatory bowel disease (IBD), when considering clinical characteristics of IBD and immunomodulator use. The secondary end point was to provide characterization of incident cancer types. Methods: All incident cases of cancer occurring in IBD patients from December 2011-2017 were prospectively recorded in 16 Italian Group for the Study of Inflammatory Bowel Disease units. Each of the IBD patients with a new diagnosis of cancer was matched with 2 IBD patients without cancer, according to IBD phenotype (ulcerative colitis [UC] vs Crohn's disease [CD]), age (±5 years), sex. Risk factors were assessed by multivariate logistic regression analysis. Results: Cancer occurred in 403 IBD patients: 204 CD (CD cases), 199 UC (UC cases). The study population included 1209 patients (403 IBD cases, 806 IBD controls). Cancer (n = 403) more frequently involved the digestive system (DS; 32%), followed by skin (14.9%), urinary tract (9.7%), lung (6.9%), genital tract (6.5%), breast (5.5%), thyroid (1.9%), lymphoma (2.7%, only in CD), adenocarcinoma of the small bowel (SBA; 3.9%, 15 CD, 1 pouch in UC), other cancers (15.9%). Among cancers of the DS, colorectal cancer (CRC) more frequently occurred in UC (29% vs 17%; P < 0.005), whereas SBA more frequently occurred in CD (13% vs 6.3% P = 0.039). In CD, perforating (B3) vs non-stricturing non-perforating (B1) behavior represented the only risk factor for any cancer (odds ratio [OR], 2.33; 95% confidence interval [CI], 1.33-4.11). In CD, risk factors for extracolonic cancer (ECC) were a B3 vs B1 and a stricturing (B2) vs B1 behavior (OR, 2.95; 95% CI, 1.62-5.43; OR, 1.79; 95% CI, 1.09-2.98). In UC, risk factors for ECC and for overall cancer were abdominal surgery for UC (OR, 4.63; 95% CI, 2.62-8.42; OR, 3.34; 95% CI, 1.88-5.92) and extensive vs distal UC (OR, 1.73; 95% CI, 1.10-2.75; OR, 1.99; 95% CI, 1.16-3.47). Another risk factor for ECC was left-sided vs distal UC (OR, 1.68; 95% CI, 1.00-2.86). Inflammatory bowel disease duration was a risk factor for skin and urinary tract cancers. Conclusions: Perforating CD, extensive UC, and abdominal surgery for UC were identified as risk factors for overall incident cancer and for ECC. The clinical characteristics associated with severe IBD may increase cancer risk.