Acute pancreatitis (AP) can result in acute kidney injury (AKI), which is linked to poor outcomes. We aimed to assess the relationship between the hematocrit-to-albumin ratio (HAR) and AKI in this population. This retrospective cohort study included consecutive patients diagnosed with AP and admitted to hospital. Data were systematically extracted from electronic medical records, covering baseline demographic and clinical characteristics. Total 1,514 AP patients were enrolled, with 17% (257/1,514) developing AKI. Multivariable-adjusted regression analysis, curve fitting, threshold effects analyses, and subgroup analyses were conducted to evaluate the relationship between HAR and AKI incidence in AP patients. Compared to the reference tertile of HAR, the adjusted OR values for the lower and higher tertiles of HAR were 1.25 (95% CI: 0.82-1.91, P = 0.297) and 1.50 (95% CI: 1.03-2.20, P = 0.037), respectively, after adjusting for covariates. The curve fitting results showed a J-shaped relationship between HAR and AKI (non-linear, p = 0.001), with an inflection point of 8.969. Furthermore, validation using the Medical Information Mart for Intensive Care (MIMIC-IV) database AP population revealed a similar relationship with an inflection point at 10.257. Our findings suggest a J-shaped relationship between HAR and AKI in AP patients, indicating higher risk of AKI when HAR exceeds 8.969.