The maintenance of terminally differentiated cells, especially hepatocytes, in vitro has proven challenging. Here we demonstrated the long-term in vitro maintenance of primary human hepatocytes (PHHs) by modulating cell signaling pathways with a combination of five chemicals (5C). 5C-cultured PHHs showed global gene expression profiles and hepatocyte-specific functions resembling those of freshly isolated counterparts. Furthermore, these cells efficiently recapitulated the entire course of hepatitis B virus (HBV) infection over 4 weeks with the production of infectious viral particles and formation of HBV covalently closed circular DNA. Our study demonstrates that, with a chemical approach, functional maintenance of PHHs supports long-term HBV infection in vitro, providing an efficient platform for investigating HBV cell biology and antiviral drug screening.