Background Carpal tunnel decompression surgery to treat carpal tunnel syndrome is a common procedure, yet data on safety and effectiveness of the operation in the general population remain scarce. We aimed to estimate the incidence of reoperation and serious postoperative complications (requiring admission to hospital or further surgery) following carpal tunnel decompression in routine clinical practice and to identify the patient factors associated with these adverse outcomes. Methods We did a nationwide cohort analysis including all carpal tunnel decompression surgeries in patients aged 18 years or older, done in the National Health Service in England between April 1, 1998, and March 31, 2017, using the Hospital Episode Statistics dataset linked to mortality records. Patients were followed-up until death or until the end of the study (March 31, 2017). Primary outcomes were the overall incidence of carpal tunnel decompression reoperation and serious postoperative complications (surgical site infection or dehiscence, or neurovascular or tendon injury, requiring admission to hospital or further surgery) within 30 days and 90 days after surgery. Multivariable Cox regression analysis was used to identify factors influencing complications and reoperation, and the Fine and Gray method was used to adjust for the competing risk of mortality. This study is registered with ClinicalTrials.gov, NCT03573765. Findings 855 832 carpal tunnel decompression surgeries were done between April 1, 1998, and March 31, 2017 (incidence rate 1•10 per 1000 person-years [95% CI 1•02-1•17]). 29 288 procedures (3•42%) led to carpal tunnel decompression reoperation (incidence rate 3•18 per 1000 person-years [95% CI 3•12-3•23]). Of the 855 832 initial surgeries, 620 procedures (0•070% [95% CI 0•067-0•078]) led to a serious complication within 30 days after surgery, and 698 procedures (0•082% [0•076-0•088]) within 90 days. Local complications within 90 days after surgery were associated with male sex (adjusted hazard ratio 2•32 [95% CI 1•74-3•09]) and age category 18-29 years (2•25 [1•10-4•62]). Male sex (adjusted subhazard ratio 1•09 [95% CI 1•06-1•13]), old age (>80 years vs 50-59 years: 1•09 [1•03-1•15]), and greater levels of comorbidity (Charlson score ≥5 vs 0: 1•25 [1•19-1•32]) and socioeconomic deprivation (most deprived 10% vs least deprived 10%: 1•18 [1•10-1•27]) were associated with increased reoperation risk. Interpretation To our knowledge, this is the largest national study on carpal tunnel decompression to date, providing strong evidence on serious postoperative complication and reoperation rates. Carpal tunnel decompression appears to be a safe operation in most patients, with an overall serious complication rate (requiring admission to hospital or further surgery) of less than 0•1%.