Immunoglobulin M (IgM) specifically recognizes various antigens and can activate complement, mediate cytotoxicity, opsonize and agglutinate pathogens to induce phagocytosis, all of which play an important role in immunity. However, the IgM response of common carp (Cyprinus carpio) in the intestinal mucosa after viral infection has not been thoroughly. Therefore, we successfully produced an anti-carp IgM monoclonal antibody and developed a model of viral infection to study the kinetics of immune responses after viral infection. Our results showed that the expression of IL1-β and Igs were dramatically increased, implying that common carp exhibited a significant innate and adaptive immune response to viral infection. Furthermore, we found that the IgM responses varied between the two infection strategies. At 14 days post-infection (DPI), a significant population of IgM+ B cells were observed in the gut, accompanied by a sharp rise in IgM levels. The immune response to secondary infection started at 7 DPI, suggesting that the IgM response is faster in the gut after re-infection. Importantly, we also explored the variability of different gut compartments to viral infection, and result revealed a stronger immune response in the hindgut than in the foregut and midgut. Overall, our findings indicate that IgM plays an important role in the intestinal immune response following primary and secondary viral infection, in which the hindgut plays a major immune function.