Nonalcoholic fatty liver disease (NAFLD) has emerged as the most prevalent pediatric liver disorder, primarily attributed to dietary shifts in recent years. NAFLD is characterized by the accumulation of lipid species in hepatocytes, leading to liver inflammation that can progress to steatohepatitis, fibrosis, and cirrhosis. Risk factors contributing to NAFLD encompass genetic variations and metabolic disorders such as obesity, diabetes, and insulin resistance. Moreover, transgenerational influences, resulting in an imbalance of gut microbial composition, epigenetic modifications, and dysregulated hepatic immune responses in offspring, play a pivotal role in pediatric NAFLD development. Maternal nutrition shapes the profile of microbiota-derived metabolites in offspring, exerting significant influence on immune system regulation and the development of metabolic syndrome in offspring. In this review, we summarize recent evidence elucidating the intricate interplay between gut microbiota, epigenetics, and immunity in fetuses exposed to maternal nutrition, and its impact on the onset of NAFLD in offspring. Furthermore, potential therapeutic strategies targeting this network are also discussed.