AbstractObesity and diabetes are risk factors for hepatocellular carcinoma (HCC); however, the underlying mechanisms are yet to be elucidated. Adeno‐associated virus (AAV) frequently infects humans and has been widely used in gene therapy, but the risk of AAV infection such as HCC should be further evaluated. Here, we show that recombinant AAV injection caused liver injury, hepatic necroptosis, and HCC indb/dbor high‐fat diet‐induced hyperglycemic and obese mice, but not in mice with only hyperglycemia or obesity. Prednisone administration or knockdown of Pebp1, highly expressed indb/dbmice, alleviated hepatic injury and necroptosis induced by recombinant AAV in mice with diabetes and obesity. Inhibition of Pebp1 pathway also attenuated inflammation and necroptosisin vitro. Our findings show that AAV infection is a critical risk factor for HCC in patients with diabetes and obesity, and AAV gene therapy for these patients should be carefully evaluated. Both prednisone treatment and targeting Pebp1 pathway are promising strategies to alleviate inflammation and necroptosis that occurred in AAV gene therapy or related diseases.