The timing of the transition between life stages is of key importance for an organism. Depending on the environmental conditions, maturing earlier at a smaller size or maturing later at a larger size can be advantageous for fitness. Exposure to parasites and subsequent immune activation may lead to alterations in development. Immune defence often comes at a cost, such as energy drain towards immune function, which is likely to delay development. On the other hand, animals may react to an anticipated risk of infection with a phenotypically plastic shift in life history, which may more likely lead to accelerated development and earlier maturation. We tested these alternatives in the red flour beetle, Tribolium castaneum. Young larvae were exposed to a non-infectious immune challenge with heat-killed bacteria (either Escherichia coli or Bacillus thuringiensis) and they were followed up for their development, survival, adult size and reproduction. We found that animals that had experienced a bacterial challenge developed into adults earlier than sham-treated beetles, while they did not differ significantly in survival or adult size. Beetles exposed to E. coli produced fewer offspring, while exposure to B. thuringiensis did not affect offspring number. Taken together, our results indicate that T. castaneum is able to speed up its development when facing a risk of infection.