The aim of this study was to investigate the effects of terpinen-4-ol (TER) supplementation on the intestinal barrier function of pigs. Five groups of fifty 28-day-old piglets with comparable body weights were randomly assigned to the following groups: the control group (CON), the lipopolysaccharide group (LPS), the low TER group (PLT), the middle TER group (PMT), and the high TER group (PHT). The basal diet was given to the CON and LPS groups, and 30, 60, or 90 mg/kg TER was added to the basal diet for the TER groups. After the 21-day trial period, piglets in the LPS and TER groups received an intraperitoneal injection of 100 μg/kg body weight of LPS, whereas the piglets in the CON group received an injection of 0.9% normal saline solution. The results showed that LPS stimulation resulted in a decrease (p < 0.05) in the depth of colonic crypts in piglets, which was greater (p < 0.05) in the TER group. Compared with those in the CON group, the number of goblet cells and MUC2 expression were decreased in the colon of piglets in the LPS group, while these parameters were increased in the PMT group (p < 0.05). The malondialdehyde (MDA) content was greater in the colon of the LPS group than in that of the CON group, while the activities of glutathione peroxidase (GSH-Px), superoxide dismutase (SOD), and catalase (CAT) were lower in the colon of the LPS group; conversely, the MDA content was lower in the colons of the PLT and PMT groups than in those of the LPS group (p < 0.05). TER also reduced (p < 0.05) LPS-induced upregulation of IL-1β and TNF-α expression, along with the relative gene expression of NLRP3, ASC, and caspase-1 in the colon of piglets (p < 0.05). Compared with those in the CON group, the abundances of Firmicutes and UCG-005 in the LPS group were lower (p < 0.05), and those in the TER group were significantly greater than those in the LPS group. Compared with those in the CON group, the abundance of Proteobacteria in the LPS group increased (p < 0.05), while the abundance of Actinobacteria and Phascolarctobacterium increased (p < 0.05) in the colon of the PHT group compared with that in the LPS group. In conclusion, TER effectively improved the intestinal barrier function of the colon in weaning piglets. Based on the results of this study, the appropriate dose of TER in the diets of weaning piglets was 60 mg/kg.