Abstract Background and Aims Hepatitis B virus (HBV) infection presents a global health burden. Despite notable advancements over recent decades, it still accounts for 42% of liver cirrhosis, 40% of hepatocellular carcinoma (HCC) and 60% of viral hepatitis-related deaths. Acute kidney injury (AKI) is prevalent in this vulnerable population, linked to increased in-hospital deaths. However, while renohepatic crosstalk in AKI being recognized, there is a scarcity of data regarding the association of AKI with the long-term liver-related mortality and complications among patients with HBV infection. The study aimed to evaluate the association between AKI with long-term liver-related mortality and complications in patients with HBV infection. Method Adult patients with hepatitis B surface antigen-positive HBV infection and without cirrhosis or HCC were identified using the China Renal Data System (2000-2022), a database compromising electronic health records data from 24 central hospitals across China. All participants were traced by the national electronic cause-of-death reporting system of the China Center for Disease Control and Prevention (CDC) to capture the dates and causes of deaths. The main exposure was AKI, detected by a well-endorsed algorithm based on SCr. In detail, at any time point t when an SCr was measured, a baseline SCr was dynamically defined as the mean of SCr levels within the 7 days before t, and each of the available SCr data within 7 days after t was compared with this baseline. AKI was defined as according to the Kidney Disease Improving Global Outcomes criteria. The primary outcome was post-discharge liver-related mortality, recorded by China CDC. The secondary outcome was a composite of new-onset liver cirrhosis and HCC, defined by diagnoses data. Only patients with at least 90 days follow-up were retained for the secondary analyses. The index date was the discharge date of patients. Fine and Gray competing risks regression was employed for the analyses. Results Of the 86 204 inpatients with HBV infection and without liver cancer or cirrhosis at baseline, 4 407 experienced AKI. During a mean follow-up of 5.0 years, 334 (0.4%) patients died of liver-related events. The cumulative incidence of liver-related mortality in patients with AKI was higher than those without AKI (0.9% vs. 0.4%). After adjustment, AKI during hospitalization was significantly associated with a higher risk of liver-related mortality after discharge (adjusted HR, 1.78; 95% CI, 1.26-2.51, P = 0.001). When reclassified AKI into stage 1 and stage 2/3, patients with more severe AKI (stage 2 or 3 AKI) had a HR of 3.21 (95% CI, 2.01-5.11) for liver-related deaths compared to those patients with non-AKI. Among 42 012 patients with at least one medical visit after 90 days of discharge, the adjusted HR of AKI associated with new-onset HCC or cirrhosis was 1.33 (95% CI, 1.10-1.60, P = 0.004). In subgroup analysis, the associations between AKI with liver-related mortality and complications remained consistent across different subgroups (all P for interaction > 0.05). Conclusion In conclusion, our study highlights the potential role of AKI as a risk factor for liver-related mortality and incident liver-related complications in patients with HBV infection. Physicians should be aware of the poor prognosis associated with AKI in this population. Intensive monitoring and early intervention for AKI are warranted to improve patient outcomes.