Hepatic encephalopathy (HE) is a common complication of liver cirrhosis, associated with high morbidity and mortality, for which no brain-targeted therapies exist at present. The interplay between hyperammonemia and inflammation is thought to drive HE development. As such, astrocytes, the most important ammonia-metabolizing cells in the brain, and microglia, the main immunomodulatory cells in the brain, have been heavily implicated in HE development. As insight into cellular perturbations driving brain pathology remains largely elusive, we aimed to investigate cell-type specific transcriptomic changes in the HE brain. In the recently established mouse bile duct ligation (BDL) model of HE, we performed RNA-Seq of sorted astrocytes and microglia at 14 and 28 days after induction. This revealed a marked transcriptional response in both cell types which was most pronounced in microglia. In both cell types, pathways related to inflammation and hypoxia, mechanisms commonly implicated in HE, were enriched. Additionally, astrocytes exhibited increased corticoid receptor and oxidative stress signaling, whereas microglial transcriptome changes were linked to immune cell attraction. Accordingly, both monocytes and neutrophils accumulated in the BDL mouse brain. Time-dependent changes were limited in both cell types, suggesting early establishment of a pathological phenotype. While HE is often considered a unique form of encephalopathy, astrocytic and microglial transcriptomes showed significant overlap with previously established gene expression signatures in other neuroinflammatory diseases like septic encephalopathy and stroke, suggesting common pathophysiological mechanisms. Our dataset identifies key molecular mechanisms involved in preclinical HE and provides a valuable resource for development of novel glial-directed therapeutic strategies.Graphical AbstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s12974-023-02814-w.