This study was conducted to determine the effects on intestinal function, anti-inflammatory role and possible mechanism of polyethylene glycosylated (PEGylated) porcine glucagon-like peptide-2 (pGLP-2), a long-acting form of pGLP-2, in weaning piglets challenged with Escherichia coli lipopolysaccharide (LPS). We divided 18 weaned piglets on day 21 into three groups (control, LPS and LPS+PEG-pGLP-2; n=6). The piglets from the LPS+PEG-pGLP-2 group were injected with PEG-pGLP-2 at 10 nmol/kg BW from 5 to 7 days of the trials daily. On 8th day, the piglets in the LPS and LPS+PEG-pGLP-2 groups were intraperitoneally administered with 100 µg LPS/kg. The control group was administered with the same volume of saline solution. The piglets were then sacrificed on day 28. Afterwards, serum, duodenum, jejunum and ileum samples were collected for analysis of structural and functional endpoints. LPS+PEG-pGLP-2 treatment increased (P<0.05) lactase activities in the duodenum and the jejunum compared with LPS treatment. LPS+PEG-pGLP-2 treatment also significantly increased sucrase activity in the jejunum compared with LPS treatment. Furthermore, LPS treatment increased (P<0.05) the mRNA expression levels of interleukin (IL)-8, tumour necrosis factor-α (TNF-α) and IL-10 in the ileum compared with the control treatment. By contrast, LPS+PEG-pGLP-2 treatment decreased (P<0.05) the mRNA expression levels of IL-8, IL-10 and TNF-α in the ileum compared with the LPS treatment. LPS treatment also increased (P<0.05) the mRNA expression level of GLP-2 receptor (GLP-2R) and the percentage of GLP-2R-positive cells in the ileum; by comparison, these results were (P<0.05) reduced by LPS+PEG-pGLP-2 treatment. Moreover, LPS+PEG-pGLP-2 treatment increased (P<0.05) the content of serum keratinocyte growth factor compared with the control group and the LPS group. The protective effects of PEG-pGLP-2 on intestinal digestive function were associated with the release of GLP-2R mediator (keratinocyte growth factor) and the decrease in the expressions of intestinal pro-inflammatory cytokines.