Objective The impact of COVID-19 in patients with pre-existing hepato-pancreato-biliary (HPB) conditions is not clearly understood. To explore risk factors associated with COVID-19 susceptibility and survival in this patient group, we conducted a single-centre retrospective cohort study. Design We interrogated linked electronic health records for patients diagnosed with HPB diseases in East London since 2008 (n=15 586), and identified 212 confirmed COVID-19 cases between February 12 and June 12, 2020. We conducted risk analyses to identify the effect of demographics, comorbidities and associated medication use, and lifestyle factors and with appropriate adjustment for gender, ethnicity, age group and HPB diagnoses on COVID-19 incidence and mortality. Results We observed an increased risk of COVID-19 for men (Relative Risk, RR=1.59; 95% CI 1.21 to 2.09) and Black ethnicity (RR=2.2; 95% CI 1.5 to 3.18). Substance mis-users were at more risk of infection, so were patients on Vitamin D treatment. The higher risks associated with South Asian ethnicity, patients with pre-existing non-malignant pancreatic or liver conditions, age>70, and past smokers were due to co-existing comorbidities; surprisingly current smokers were associated with a lower risk. Increased mortality risk was observed for Black ethnicity (RR=2.4; 95% CI 1.35 to 3.48), and patients with a pre-existing kidney condition (RR=2.13; 95% CI 1.16 to 3.55) - particularly when accompanied with an acute episode of renal complications (RR=2.74; 95% CI 1.32 to 5.13). Conclusions This large multi-ethnic population-based study of HPB patients shows a higher risk of acquiring COVID-19 for male gender, Black ethnicity, medical co-morbidities, and substance mis-users. Particular attention should be paid to patients with a pre-existing kidney disease for further renal insult to prevent fatality.