PURPOSEEpidemiologic studies suggest that chronic hepatitis B (CHB) is a risk factor for various primary extrahepatic malignancies. Our aim was to evaluate the associations of CHB and nucleos(t)ide analog (NA) treatment with the risk of the development of extrahepatic malignancies.PATIENTS AND METHODSWe conducted an 18-month landmark analysis using nationwide claims data from the National Health Insurance Service of South Korea. Patients newly diagnosed with CHB in 2012-2014 (n = 90,944) and matched-controls (n = 685,436) were included. Patients with CHB were further classified as the NA-treated (CHB+/NA+, n = 6,539) or the NA-untreated (CHB+/NA-, n = 84,405) group. Inverse probability of treatment weighting analysis was applied to balance the treatment groups. Time-varying Cox analysis was performed to evaluate time-varying effect of NA treatment. The primary outcome was the development of any primary extrahepatic malignancy. Development of intrahepatic malignancy and death were considered as competing events.RESULTSDuring the study period (median = 47.4 months), 30,413 patients (3.9%) developed any extrahepatic malignancy. The CHB+/NA- group had a higher overall risk of extrahepatic malignancy than the CHB+/NA+ group (adjusted subdistribution hazard ratio [aSHR] = 1.28; 95% CI, 1.12 to 1.45; P <.001) or controls (aSHR = 1.22; 95% CI, 1.18 to 1.26; P <.001). There was no difference in the risk of extrahepatic malignancy between the CHB+/NA+ group and the controls (CHB+/NA+ v control: aSHR = 0.96; 95% CI, 0.84 to 1.08; P =.48). In time-varying Cox analysis, the CHB+/NA- patients were associated with a higher risk of extrahepatic malignancy than the CHB+/NA+ patients (aSHR = 1.37; 95% CI, 1.23 to 1.52; P <.001).CONCLUSIONPatients with CHB have an elevated risk of developing primary extrahepatic malignancy. Long-term NA treatment was associated with a lower risk of extrahepatic malignancy development among patients with CHB.