Our findings suggest that HBV infection is associated with an increased risk of HCC diagnosis but is not linked to an elevated risk of CRC. These findings may inform future clinical practice and research regarding the relationship between HBV and extrahepatic malignancies.