Much of our current knowledge on shrimp immune system is restricted to the defense reactions mediated by the hemocytes and little is known about gut immunity. Here, we have investigated the transcriptional profile of immune-related genes in different organs of the digestive system of the shrimp Litopenaeus vannamei. First, the tissue distribution of 52 well-known immune-related genes has been assessed by semiquantitative analysis in the gastrointestinal tract (foregut, midgut and hindgut) and in the hepatopancreas and circulating hemocytes of shrimp stimulated or not with heat-killed bacteria. Then, the expression levels of 18 genes from key immune functional categories were quantified by fluorescence-based quantitative PCR in the midgut of animals experimentally infected with the Gram-negative Vibrio harveyi or the White spot syndrome virus (WSSV). Whereas the expression of some genes was induced at 48 h after the bacterial infection, any of the analyzed genes showed to be modulated in response to the virus. Whole-mount immunofluorescence assays confirmed the presence of infiltrating hemocytes in the intestines, indicating that the expression of some immune-related genes in gut is probably due to the migratory behavior of these circulating cells. This evidence suggests the participation of hemocytes in the delivery of antimicrobial molecules into different portions of the digestive system. Taken all together, our results revealed that gut is an important immune organ in L. vannamei with intimate association with hemocytes.