Research on the association between activity levels and sedentary behaviour with frailty in patients affected by hepatitis B cirrhosis is sparse. This study aimed to explore the association of frailty with activity levels and sedentary behaviours in patients with hepatitis B cirrhosis. This cross-sectional study followed the STROBE checklist. This study was conducted in Guangzhou, China, between August 2021 and October 2022. The frailty condition of patients with hepatitis B cirrhosis was assessed using the liver frailty index (LFI). Their physical activity levels and sedentary time were assessed using the International Questionnaire of Physical Activity. Pearson correlation and binary logistic regression were used to analyse the data. Among the 503 patients with hepatitis B cirrhosis in the final analysis, 107 (21.3%) were identified as frail. Frailty was negatively correlated with walking time (r = -0.174, p < 0.001), moderate-intensity activity time (r = -0.185, p < 0.001), high-intensity activity time (r = -0.243, p < 0.001) and total activity time (r = -0.256, p < 0.001). Patients with insufficient activity (<150 min/week) and sedentary behaviour (≥420 min/day) were found to have 2.829 times higher risk of frailty than those with sufficient activity (≥150 min/week) and no sedentary behaviour (<420 min/day) (95% CI: 1.380, 5.799). Patients with hepatitis B cirrhosis who exhibited frailty demonstrated limited physical activity and engaged in sedentary behaviours. Patients with hepatitis B cirrhosis contributed their data to the study.