Liver cancer including hepatocellular carcinoma (HCC) and intrahepatic cholangiocarcinoma (iCCA) is the third leading cause of cancer-related deaths worldwide. HCC arises from hepatocyte or hepatic stem cells, while iCCA originates from biliary epithelial cells, and the respective biological context are very different. Despite screening programs, the diagnosis of liver cancer is in most cases made when curative treatments such as surgery or ablation are not possible. In 2020, after a decade of using only tyrosine kinase inhibitors (TKI), a combination of an immune-check point inhibitor (ICI) and a VEGF antagonist proved superior to a TKI as first line therapy of advanced HCC. In 2022, the addition of an ICI to standard chemotherapy demonstrated an improvement of patient survival in iCCA. Moreover, ICI offer an unprecedented rate of durable responses to HCC and iCCA patients. Nevertheless, still two thirds of patients do not respond to ICI-based combinations, and research efforts are focused on deciphering the mechanisms of immune evasion of these lethal cancers. Reliable predictive and prognostic biomarkers are still lacking, but the molecular phenotyping of the tumor microenvironment is currently providing potential candidates for patient stratification. In this review, we will summarize the current knowledge on the immune biology of the liver, the discovery of cell-intrinsic and immune cell-mediated mechanisms of immune evasion by means of high-resolution single cell data, the main targets of current immunotherapy approaches, and the recent milestones in immunotherapy of HCC and iCCA.