The flour beetle, Tribolium castaneum, is an intermediate host for the tapeworm Hymenolepis diminuta and has become an important genetic model to explore immune responses to parasite infection in insect hosts. The present study examined the immune responses to tapeworm infection in resistant (TIW1) and susceptible (cSM) strains of the red flour beetle, T. castaneum, using real-time quantitative reverse transcription PCR on 29 immunity-related genes that exhibit antimicrobial properties. Thirteen of the 29 genes showed constitutive differences in expression between the two strains. Fourteen to fifteen of the 29 genes exhibited significant differences in transcription levels when beetles were challenged with tapeworm parasite in the resistant and susceptible strains. Nine genes (GNBP3, cSPH2, lysozyme4, defensin1, PGRP-SA, defensin2, coleoptericin1, attacin2 and serpin29) in cSM and 13 genes (lysozyme2, proPO1, GNBP3, cSPH2, lysozyme4, defensin1, PGRP-SA, defensin2, coleoptericin1, attacin2, proPO2/3, PGRP-LE and PGRP-SB) in TIW1 were up-regulated by infections or showed parasite infection-induced expression. Seven genes (attacin2, coleoptericin1, defensin1, defensin2, lysozyme2, PGRP-SA and PGRP-SB) were more than 10 folds higher in the resistant TIW1 strain than in the susceptible cSM strain after exposure to tapeworm parasites. This study demonstrated the effects of genetic background, the transcription profile to parasite infection, and identified the immunity-related genes that were significantly regulated by the infection of tapeworms in Tribolium beetles.