The present study investigated the effect of feeding bovine colostrum (BC) to piglets in comparison with feeding a milk replacer (MR) and conventional rearing by the sow on the intestinal immune system and number of enterotoxigenic Escherichia coli (ETEC) colonising the intestinal tissue. Piglets (23-d-old) were allocated to one of the following four groups: (1) killed at the beginning of the experiment (Base); (2) separated from the sow and fed BC (BC-fed); (3) separated from the sow and fed a MR (MR-fed); (4) kept with the sow (Sow-Milk). Blood was sampled on days 1 and 8, and faecal samples were collected on days 1, 3, 5 and 8. On day 8, piglets were killed and gastrointestinal digesta and intestinal segments were collected. The frequency of diarrhoea was found to be higher (P≤ 0·019) in MR-fed piglets than in BC-fed and Sow-Milk piglets. Piglets from the MR-fed group had the lowest lactic acid bacteria:haemolytic E. coli ratio (P treat= 0·064) in the faeces. The number of E. coli colonising the intestinal tissue was higher (P< 0·001) in piglets from the MR-fed group than in those from the BC-fed and Sow-Milk groups. Piglets from the Sow-Milk group had a higher (P= 0·020) mucosal IgG concentration than those from the MR-fed group, but did not exhibit any difference when compared with piglets from the Base and BC-fed groups. Piglets from the BC-fed group exhibited a reduced (P≤ 0·037) expression level of Toll-like receptor-4 in the intestinal mucosa when compared with those from the MR-fed and Sow-Milk groups. The expression level of IL-2 was higher (P≤ 0·051) in piglets from the MR-fed group than in those from the other treatment groups. In conclusion, feeding BC rather than MR to the piglets reduced the colonisation of intestine by ETEC and modulated the intestinal immune system, whereas no differences were observed in piglets fed BC and conventionally reared by the sows.