ABSTRACT: The aim of this study was to evaluate the effect of Hermetia illucens larvae meal (HI) on the growth performance and intestinal barrier function of weaned pigs. To achieve this, 72 weaned pigs [28-day-old, 8.44 ± 0.04 kg body weight (BW)] were randomly assigned to three dietary treatments: basal diet (negative control, NC), zinc oxide-supplemented diet (positive control, PC), and HI-supplemented diet [100% replacement of fishmeal (FM), HI], for 28 days in the presence of enterotoxigenic Escherichia coli (ETEC). The results showed that HI and PC increased (p < 0.05) the average daily gain (ADG) and average daily feed intake (ADFI) of weaned pigs from day 1 to 14, and decreased diarrhea incidence from day 1 to 28. Additionally, HI increased (p < 0.05) claudin-1, occludin, mucin-1 (MUC-1), and MUC-2 expression, goblet cell number, and secretory immunoglobulin A (sIgA) concentration in the intestine of weaned pigs. Compared with NC, HI downregulated (p < 0.05) interleukin-1β (IL-1β) and IL-8 expression, and upregulated IL-10, transforming growth factor-β (TGF-β), antimicrobial peptide [porcine β defensin 1 (pBD1), pBD2, protegrin 1-5 (PG1-5)] expression in the jejunum or ileum. Moreover, HI decreased (p < 0.05) toll-like receptor 2 (TLR2), phosphorylated nuclear factor-κB (p-NF-κB), and phosphorylated mitogen-activated protein kinase (p-MAPK) expression, and increased sirtuin 1 (SIRT1) expression in the ileum. Additionally, HI increased histone deacetylase 3 (HDAC3) expression and acetylation of histone 3 lysine 27 (acH3k27) in the ileum. Furthermore, HI positively influenced the intestinal microbiota composition and diversity of weaned pigs and increased (p < 0.05) butyrate and valerate concentrations. Overall, dietary HI improved growth performance and intestinal barrier function, as well as regulated histone acetylation and TLR2-NF-κB/MAPK signaling pathways in weaned pigs.