Nonalcoholic fatty liver disease (NAFLD) is becoming the most common chronic liver disease in the world. Immunity is the major contributing factor in NAFLD; however, the interaction of immune cells and hepatocytes in disease progression has not been fully elucidated. As a popular species for studying NAFLD, zebrafish, whose liver is a complex immune system mediated by immune cells and non-immune cells in maintaining immune tolerance and homeostasis. Understanding the cellular composition and immune environment of zebrafish liver is of great significance for its application in NAFLD. Here, we established a liver atlas that consists of 10 cell types using single-cell RNA sequencing (scRNA-seq). By examining the heterogeneity of hepatocytes and analyzing the expression of NAFLD-associated genes in the specific cluster, we provide a potential target cell model to study NAFLD. Additionally, our analysis identified two subtypes of distinct resident macrophages with inflammatory and non-inflammatory functions and characterized the successive stepwise development of T cell subclusters in the liver. Importantly, we uncovered the possible regulation of macrophages and T cells on target cells of fatty liver by analyzing the cellular interaction between hepatocytes and immune cells. Our data provide valuable information for an in-depth study of immune cells targeting hepatocytes to regulate the immune balance in NAFLD.