To restrict infection by Legionella pneumophila, mouse macrophages require Naip5, a member of the nucleotide-binding oligomerization domain leucine-rich repeat family of pattern recognition receptors, which detect cytoplasmic microbial products. We report that mouse macrophages restricted L. pneumophila replication and initiated a proinflammatory program of cell death when flagellin contaminated their cytosol. Nuclear condensation, membrane permeability, and interleukin-1beta secretion were triggered by type IV secretion-competent bacteria that encode flagellin. The macrophage response to L. pneumophila was independent of Toll-like receptor signaling but correlated with Naip5 function and required caspase 1 activity. The L. pneumophila type IV secretion system provided only pore-forming activity because listeriolysin O of Listeria monocytogenes could substitute for its contribution. Flagellin monomers appeared to trigger the macrophage response from perforated phagosomes: once heated to disassemble filaments, flagellin triggered cell death but native flagellar preparations did not. Flagellin made L. pneumophila vulnerable to innate immune mechanisms because Naip5+ macrophages restricted the growth of virulent microbes, but flagellin mutants replicated freely. Likewise, after intratracheal inoculation of Naip5+ mice, the yield of L. pneumophila in the lungs declined, whereas the burden of flagellin mutants increased. Accordingly, macrophages respond to cytosolic flagellin by a mechanism that requires Naip5 and caspase 1 to restrict bacterial replication and release proinflammatory cytokines that control L. pneumophila infection.