Pathogenic invasion by Escherichia coli and Salmonellae remains a constant threat to the integrity of the intestinal epithelium and can rapidly induce inflammatory responses. At birth, colostrum consumption exerts numerous beneficial effects on the properties of intestinal epithelial cells and protects the gastrointestinal tract of newborns from pathogenic invasion. The present study aimed to investigate the effect of colostrum on the early and late inflammatory responses induced by pathogens. The short-term (2 h) and long-term (24 h) effects of exposure to heat-killed (HK) E. coli and Salmonella enterica Typhimurium on gene expression in the porcine intestinal epithelial cell (IPEC-J2) model were first evaluated by microarray and quantitative PCR analyses. Luciferase assays were performed using a NF-κB-luc reporter construct to investigate the effect of colostrum whey treatment on the activation of NF-κB induced by HK bacteria. Luciferase assays were also performed using NF-κB-luc, IL-8-luc and IL-6-luc reporter constructs in human colon adenocarcinoma Caco-2/15 cells exposed to dose–response stimulations with HK bacteria and colostrum whey. Bovine colostrum whey treatment decreased the expression of early and late inflammatory genes induced by HK bacteria in IPEC-J2, as well as the transcriptional activation of NF-κB-luc induced by HK bacteria. Unlike that with colostrum whey, treatment with other milk fractions failed to decrease the activation of NF-κB-luc induced by HK bacteria. Lastly, the reduction of the HK bacteria-induced activation of NF-κB-luc, IL-8-luc and IL-6-luc by colostrum whey was dose dependent. The results of the present study indicate that bovine colostrum may protect and preserve the integrity of the intestinal mucosal barrier in the host by controlling the expression levels of early and late inflammatory genes following invasion by enteric pathogens.