Early weaning-induced stress precipitates diarrhoea, significantly curtailing the growth performance of piglets. A pivotal contributor to this postweaning affliction is the emergence of gut bacterial dysbiosis. Enterococcus hirae, a promising probiotic, has indicated unclear effects and mechanisms on intestinal health. In this study, we investigated the effects and underlying mechanisms of oral supplementation with Ningxiang pig-derived Enterococcus hirae HNAU0516 orally supplementation on the gut bacterial community, immune response and gut barrier function in piglets. 21 d age Duroc × (Landrace × Yorkshire) piglets with a similar BW were randomly allocated to two groups. The Enterococcus hirae HNAU0516 administration group was inoculated orally with Ningxiang pig-derived Enterococcus hirae HNAU0516 throughout the trial period. Conversely, the control group received the same volume of physiological saline. Our findings revealed that Enterococcus hirae HNAU0516 supplementation effectively reduced diarrhoea rates of piglets (P = 0.010). Notably, this probiotic promoted intestinal development and enhanced intestinal barrier function. It also showed potential anti-inflammatory properties. Furthermore, Enterococcus hirae HNAU0516 supplementation significantly remodelled the colonic microbiota and increased the production of acetate (P = 0.007). In conclusion, our study highlights that Ningxiang pig-derived Enterococcus hirae HNAU0516 improves postweaning diarrhoea by promoting intestinal development, enhancing intestinal barrier function, decreasing intestinal permeability, modulating intestinal microbiota, and increasing short-chain fatty acids production.