Objective To investigate the importance of hepatitis B virus(HBV)infection in the pathogenesis of cholangiocarcinoma(CC)and further clarify the correlation between the occurrence of intrahepatic and extrahepatic cholangiocarcinoma.Methods HBV protein and gene of 52 formalin fixed,paraffin embedded tissues with CC were detected by immunohistochemistry and nest PCR.Results Hepatitis B virus X gene was detectable in 33.3%(7/21)of 21 intrahepatic cholangiocarcinoma cases.Hepatitis B surface antigen(HBsAg)was detectable in 21.7%(5/21)and hepatitis B core antigen(HBcAg)was detectable in 19.0%(4/21)of 21 intrahepatic cholangiocarcinoma cases.In contrast,no HBsAg,HBcAg and hepatitis B virus X gene were detected in any of the 31 extrahepatic cholangiocarcinoma cases.Conclusion HBV infection is a significant risk factor for intrahepatic cholangiocarcinoma,but not for extrahepatic cholangiocarcinoma,in Northeast of China.The integration of HBV gene may be involved in the carcinogenesis of intrahepatic bile duct epithelial cells.