Mechanistic study and precision treatment of primary liver cancer (PLC) are hindered by marked heterogeneity, which is challenging to recapitulate in any given liver cancer mouse model. Here, we report the generation of 25 mouse models of PLC by in situ genome editing of hepatocytes recapitulating 25 single or combinations of human cancer driver genes. These mouse tumors represent major histopathological types of human PLCs and could be divided into three human-matched molecular subtypes based on transcriptomic and proteomic profiles. Phenotypical characterization identified subtype- or genotype-specific alterations in immune microenvironment, metabolic reprogramming, cell proliferation, and expression of drug targets. Furthermore, single-cell analysis and expression tracing revealed spatial and temporal dynamics in expression of pyruvate kinase M2 (Pkm2). Tumor-specific knockdown of Pkm2 by multiplexed genome editing reversed the Warburg effect and suppressed tumorigenesis in a genotype-specific manner. Our study provides mouse PLC models with defined genetic drivers and characterized phenotypical heterogeneity suitable for mechanistic investigation and preclinical testing.