The harlequin ladybird beetle Harmonia axyridis has emerged as a model species in invasion biology because of its strong resistance against pathogens and remarkable capacity to outcompete native ladybirds. The invasive success of the species may reflect its well-adapted immune system, a hypothesis we tested by analysing the transcriptome and characterizing the immune gene repertoire of untreated beetles and those challenged with bacteria and fungi. We found that most H. axyridis immunity-related genes were similar in diversity to their counterparts in the reference beetle Tribolium castaneum, but there was an unprecedented expansion among genes encoding antimicrobial peptides and proteins (AMPs). We identified more than 50 putative AMPs belonging to seven different gene families, and many of the corresponding genes were shown by quantitative real-time RT-PCR to be induced in the immune-stimulated beetles. AMPs with the highest induction ratio in the challenged beetles were shown to demonstrate broad and potent activity against Gram-negative bacteria and entomopathogenic fungi. The invasive success of H. axyridis can therefore be attributed at least in part to the greater efficiency of its immune system, particularly the expansion of AMP gene families and their induction in response to pathogens.