The present study examined the effect of glutamine (Gln)-enriched diets before sepsis or Gln-containing total parenteral nutrition (TPN) after sepsis, or both, on the phagocytic activity and blood lymphocyte subpopulation in rats with gut-derived sepsis. Rats were assigned to a control group or one of four experimental groups. The control group and groups 1 and 2 were fed a semipurified diet; groups 3 and 4 had part of casein replaced by Gln. After feeding the diets for 10d, sepsis was induced by caecal ligation and puncture (CLP); TPN was maintained for 3d after CLP. The control group and groups 1 and 3 were infused with conventional TPN and groups 2 and 4 were supplemented with Gln in the TPN solution. All rats were killed 3d after CLP or sham operation to examine their immune responses. The results showed that compared with the control group, the phagocytic activities of peritoneal macrophages were enhanced in groups 3 and 4, but not in groups 1 and 2. The proportion of CD3+ cells in group 1 was significantly lower (P<0·05) than that of the control group, whereas no differences were observed among the control and Gln-supplemented groups. The CD4+ cell proportion was significantly lower (P<0·05) in group 1 compared with the control group and groups 3 and 4. These findings suggest that Gln-enriched diets before CLP significantly enhanced peritoneal macrophage phagocytic activity, preserved CD4+ cells and maintained blood total T lymphocytes in gut-derived sepsis. However, parenteral Gln administration after caecal ligation and puncture had no favourable effects on modulating immune response in septic rats.