AimThe aim of this work was to investigate whether nonsteroidal anti‐inflammatory drugs (NSAIDs) could be beneficial or harmful when used perioperatively for colorectal cancer patients, as inflammation may affect occult disease and anastomotic healing.MethodThis is a protocol‐based retrospective cohort study on colorectal cancer patients operated on between 2007 and 2012 at 21 hospitals in Sweden. NSAID exposure was retrieved from postoperative analgesia protocols, while outcomes and patient data were retrieved from the Swedish Colorectal Cancer Registry. Older or severely comorbid patients, as well as those with disseminated or nonradically operated tumours were excluded. Multivariable regression with adjustment for confounders was performed, estimating hazard ratios (HRs) for long‐term outcomes and odds ratios (ORs) for short‐term outcomes, including 95% confidence intervals (CIs).ResultsSome 6945 patients remained after exclusion, of whom 3996 were treated at hospitals where a NSAID protocol was in place. No association was seen between NSAIDs and recurrence‐free survival (HR 0.97, 95% CI 0.87–1.09). However, a reduction in cancer recurrence was detected (HR 0.83, 95% CI 0.72–0.95), which remained significant when stratifying into locoregional (HR 0.68, 95% CI 0.48–0.97) and distant recurrences (HR 0.85, 95% CI 0.74–0.98). Anastomotic leakage was less frequent (HR 0.69%, 95% CI 0.51–0.94) in the NSAID‐exposed, mainly due to a risk reduction in colo‐rectal and ileo‐rectal anastomoses (HR 0.47, 95% CI 0.33–0.68).ConclusionThere was no association between NSAID exposure and recurrence‐free survival, but an association with reduced cancer recurrence and the rate of anastomotic leakage was detected, which may depend on tumour site and anastomotic location.