Chronic liver diseases such as nonalcoholic fatty liver disease (NAFLD) or viral hepatitis are characterized by persistent inflammation and subsequent liver fibrosis. Liver fibrosis critically determines long-term morbidity (for example, cirrhosis or liver cancer) and mortality in NAFLD and nonalcoholic steatohepatitis (NASH). Inflammation represents the concerted response of various hepatic cell types to hepatocellular death and inflammatory signals, which are related to intrahepatic injury pathways or extrahepatic mediators from the gut-liver axis and the circulation. Single-cell technologies have revealed the heterogeneity of immune cell activation concerning disease states and the spatial organization within the liver, including resident and recruited macrophages, neutrophils as mediators of tissue repair, auto-aggressive features of T cells as well as various innate lymphoid cell and unconventional T cell populations. Inflammatory responses drive the activation of hepatic stellate cells (HSCs), and HSC subsets, in turn, modulate immune mechanisms via chemokines and cytokines or transdifferentiate into matrix-producing myofibroblasts. Current advances in understanding the pathogenesis of inflammation and fibrosis in the liver, mainly focused on NAFLD or NASH owing to the high unmet medical need, have led to the identification of several therapeutic targets. In this Review, we summarize the inflammatory mediators and cells in the diseased liver, fibrogenic pathways and their therapeutic implications.