BackgroundThe safety of immune‐checkpoint inhibitors (ICIs) has not been thoroughly investigated in non–small cell lung cancer (NSCLC) patients with chronic hepatitis B (CHB) or occult hepatitis B infection (OBI). The authors analyzed the incidence of hepatitis B virus (HBV) reactivation, immune‐related hepatitis and jaundice in NSCLC patients in a real‐world setting.MethodsA total of 1277 NSCLC patients treated with ICIs were analyzed. Among them, 52 patients were hepatitis B surface antigen (HBsAg) (+) (group A, CHB), 759 patients were HBsAg (–)/hepatitis B core antibody immunoglobulin G (anti‐HBc IgG) (+) (group B, OBI), and 466 patients were HBsAg (–)/anti‐HBc IgG (–) (group C). Among the 52 patients with CHB, 38 (73.1%) were receiving antiviral therapy. The primary end point was HBV reactivation, immune‐related hepatitis, and jaundice. The secondary end points included other immune‐related adverse events and efficacy.ResultsHBV reactivation was observed in two patients (0.2%) who were both in group A (CHB). Among CHB patients who were not receiving antiviral therapy, HBV reactivation was observed in 14.3% (2 of 14 patients). The incidences of immune‐related hepatitis and jaundice were comparable among the three groups. The incidence of ≥grade 3 other immune‐related adverse events and efficacy were all comparable among the three groups (p > .05 for all comparisons).ConclusionsIn this large, real‐world cohort study, the safety and efficacy of ICIs were comparable in patients with CHB and OBI. HBV reactivation was observed in patients with CHB without antiviral therapy indicating antiviral prophylaxis should be required for them. For patients with OBI, the risk of HBV reactivation was minimal.