Patients with ulcerative colitis are reported to be at increased risk of colorectal cancer and are also at high risk of postoperative complications. However, the incidence of postoperative complications in these patients and how the type of surgery performed affects prognosis are not well understood. Data collected by the Japanese Society for Cancer of the Colon and Rectum on ulcerative colitis patients with colorectal cancer between January 1983 and December 2020 were analyzed according to whether total colorectal resection was performed with ileoanal anastomosis (IAA), ileoanal canal anastomosis (IACA), or permanent stoma creation. The incidence of postoperative complications and the prognosis for each surgical technique were investigated. The incidence of overall complications was not significantly different among the IAA, IACA, and stoma groups (32.7%, 32.3%, and 37.7%, respectively; p=0.510). The incidence of infectious complications was significantly higher in the stoma group (21.2%) than in the IAA (12.9%) and IACA (14.6%) groups (p=0.048); however, the noninfectious complication rate was lower in the stoma group (13.7%) than in the IAA (21.1%) and IACA (16.2%) groups (p=0.088). Five-year relapse-free survival was higher in patients without complications than in those with complications in the IACA group (92.8% vs. 75.2%; p=0.041) and the stoma group (78.1% vs. 71.2%, p=0.333) but not in the IAA group (90.3% vs. 90.0%, p=0.888). The risks of infectious and noninfectious complications differed according to the type of surgical technique used. Postoperative complications worsened prognosis.