Injectable hydrogels have been paid more attentions on cell therapy and tissue regeneration resulting from the applications in minimally invasive surgical procedures with ease of handling and complete filling of defect area. Here, a biodegradable and injectable in situ hydrogel formed by glycyrrhizin (GL), alginate (Alg), and calcium (Ca) was developed for three‐dimensional (3D) cell culture. Differential scanning calorimetry (DSC), X‐ray diffraction (XRD), scanning electron microscope (SEM) and rheology analysis were performed to characterize GL‐Alg‐Ca hydrogel and evaluate its formation mechanism, properties, and morphology. The biocompatibility of hydrogel was investigated by cell viability, morphology, and liver specific functions. The results of DSC, XRD, and rheology suggested that hydrogel was homogenous complex with stable structure and well viscoelasticity. Human hepatoma HepG2 cells cultured in hydrogels showed well morphology. Compared with the control group, cells in hydrogels showed good biocompatibility, and could maintain the viability, proliferation and liver function for longer periods of time. Furthermore, the hydrogel improved the mRNA expression of cytochrome P450, which were key enzyme to the metabolization of hepatocytes. The GL‐Alg‐Ca hydrogel could be a potential 3D cells culture system for liver tissue engineering. © 2018 Wiley Periodicals, Inc. J Biomed Mater Res Part A: 106A: 3292–3302, 2018.