In traumatic brain injury (TBI), the initial injury phase is followed by a secondary phase that contributes to neurodegeneration, yet the mechanisms leading to neuropathology in vivo remain to be elucidated. To address this question, we developed a Drosophila head-specific model for TBI termed Drosophila Closed Head Injury (dCHI), where well-controlled, nonpenetrating strikes are delivered to the head of unanesthetized flies. This assay recapitulates many TBI phenotypes, including increased mortality, impaired motor control, fragmented sleep, and increased neuronal cell death. TBI results in significant changes in the transcriptome, including up-regulation of genes encoding antimicrobial peptides (AMPs). To test the in vivo functional role of these changes, we examined TBI-dependent behavior and lethality in mutants of the master immune regulator NF-κB, important for AMP induction, and found that while sleep and motor function effects were reduced, lethality effects were enhanced. Similarly, loss of most AMP classes also renders flies susceptible to lethal TBI effects. These studies validate a new Drosophila TBI model and identify immune pathways as in vivo mediators of TBI effects.