It is well known that chronic inflammatory conditions involving the bile ducts predispose to the development of bile duct carcinoma, although the relationship between chronic inflammation and malignant transformation is unclear. In this study, by combining immunohistochemistry and computer imaging techniques, we quantified and compared the cyclooxygenase-2 (COX-2) protein expression levels of epithelial cells according with their histopathological backgrounds. This technique revealed that the highest levels of COX-2 were expressed in bile duct carcinoma cells, mainly in cytoplasm, and the expression pattern was homogenous and abundant. Moderate levels of COX-2 protein expression were also observed in noncancerous epithelial cells with inflammatory reaction, but the staining intensity was heterogeneous among the positive cells exhibiting inflammation. In contrast, only scattered weak reactivity of COX-2 protein was observed in the noncancerous bile duct epithelial cells without inflammatory reaction. Moreover, bile duct epithelial cells in primary sclerosing cholangitis (PSC) showed very strong expression of COX-2 protein, that was comparable with carcinoma cells. On the other hand, primary biliary cirrhosis (PBC) epithelial cells showed moderate levels of COX-2 expression. In addition, specific COX-2 inhibitors, JTE-522 and NS-398, directly inhibited the growth of 4 bile duct carcinoma and 1 gall bladder carcinoma cell lines that expressed COX-2 protein, in vitro. These data suggest that COX-2 expression might regulate carcinogenesis of bile duct epithelial cells in inflammatory regions and tumor progression in this cancer. The data also suggest that COX-2 selective inhibitors might have therapeutic effects not only on bile duct carcinoma, but other hepatobiliary carcinomas.