Evidence links the liver to development of colorectal cancer (CRC). However, it remains unknown how liver function may influence CRC risk in the general population. We conducted a prospective cohort study in the UK Biobank of 375 693 participants who provided blood samples in 2006 to 2010. Circulating levels of liver function markers (alanine transaminase [ALT], aspartate transaminase [AST], total bilirubin [TBIL], gamma glutamyltransferase [GGT], alkaline phosphatase [ALP], total protein [TP] and albumin [ALB]) were measured. Incident cancer cases were identified through linkage to the national cancer registry up to 2019. Repeated biomarker measurements were available from a subset of 11 320 participants who were re‐assessed in 2012 to 2013. After a median follow‐up of 10.0 years, we documented 2662 cases of CRC. Circulating levels of ALT, AST, TBIL, GGT, TP and ALB at baseline were inversely associated with CRC risk (P < .01), with multivariable hazard ratio (95% confidence interval) comparing decile 10 vs 1 of 0.62 (0.51‐0.75), 0.63 (0.53‐0.75), 0.85 (0.72‐1.02), 0.74 (0.61‐0.89), 0.70 (0.59‐0.84) and 0.66 (0.55‐0.79), respectively. Strengthened associations were found after recalibration for repeated measurements. The associations appeared stronger for proximal colon cancer than distal colon cancer and rectal cancer, but consistent for early‐, mid‐ and late‐onset CRC. In a large cohort of general population, the UK Biobank, higher circulating levels of ALT, AST, TBIL, GGT, TP and ALB, largely within the normal range, were associated with a lower risk of CRC. The findings support a link between liver function and CRC, and may spur future research on the gut‐microbiota‐liver axis.