Objective We aimed to study 1-, 5- and 10-year risks of peptic ulcer rebleeding among end-stage renal disease (ESRD) patients with regular haemodialysis, to identify the high-risk subpopulation, and to estimate the number needed to harm (NNH) to increase a peptic ulcer rebleeding in different periods.Design A nationwide cohort study.Setting Data from the Taiwan National Health Insurance Research Database.Patients Uraemic cohort and matched controls were selected from among hospitalised patients with a primary diagnosis of peptic ulcer bleeding. In total, 6447 uraemic patients and 25?788 age-, gender- and gastroprotective agent use-matched controls were selected.Intervention No.Main outcome measures Cumulative incidences and HRs.Results The cumulative incidences of ESRD patients were significantly higher than the cumulative incidences of matched controls (1?year: 18.8% vs 14.2%; 5?years: 38.5% vs 31.4%; and 10?years: 46.3% vs 39.4%; all p<0.001). The NNH to increase a peptic ulcer rebleeding by ESRD at 1, 5 and 10?years were 22, 15 and 15, respectively. On multivariate analysis, ESRD (HR=1.38, p<0.0001) was an independent risk factor for rebleeding. Compared with matched controls, ESRD was associated with higher risk of rebleeding especially in patients using ulcerogenic agents (HR=1.33–1.45), indication to prescribe gastroprotective agents (HR=1.44) and with liver cirrhosis (HR=1.45).Conclusions ESRD patients had higher long-term risk of peptic ulcer rebleeding, especially in certain populations. The enhanced risk gradually decreased after the first year and stabilised after the fifth year.