Chronic inflammation is accompanied by recurring cycles of tissue destruction and repair and is associated with an increased risk of cancer1-3. However, how such cycles affect the clonal composition of tissues, particularly in terms of cancer development, remains unknown. Here we show that in patients with ulcerative colitis, the inflamed intestine undergoes widespread remodelling by pervasive clones, many of which are positively selected by acquiring mutations that commonly involve the NFKBIZ, TRAF3IP2, ZC3H12A, PIGR and HNRNPF genes and are implicated in the downregulation of IL-17 and other pro-inflammatory signals. Mutational profiles vary substantially between colitis-associated cancer and non-dysplastic tissues in ulcerative colitis, which indicates that there are distinct mechanisms of positive selection in both tissues. In particular, mutations in NFKBIZ are highly prevalent in the epithelium of patients with ulcerative colitis but rarely found in both sporadic and colitis-associated cancer, indicating that NFKBIZ-mutant cells are selected against during colorectal carcinogenesis. In further support of this negative selection, we found that tumour formation was significantly attenuated in Nfkbiz-mutant mice and cell competition was compromised by disruption of NFKBIZ in human colorectal cancer cells. Our results highlight common and discrete mechanisms of clonal selection in inflammatory tissues, which reveal unexpected cancer vulnerabilities that could potentially be exploited for therapeutics in colorectal cancer.