Robust innate immune detection of rapidly evolving pathogens is critical for host defense. Nucleotide-binding domain leucine-rich repeat (NLR) proteins function as cytosolic innate immune sensors in plants and animals. However, the structural basis for ligand-induced NLR activation has so far remained unknown. NAIP5 (NLR family, apoptosis inhibitory protein 5) binds the bacterial protein flagellin and assembles with NLRC4 to form a multiprotein complex called an inflammasome. Here we report the cryo–electron microscopy structure of the assembled ~1.4-megadalton flagellin-NAIP5-NLRC4 inflammasome, revealing how a ligand activates an NLR. Six distinct NAIP5 domains contact multiple conserved regions of flagellin, prying NAIP5 into an open and active conformation. We show that innate immune recognition of multiple ligand surfaces is a generalizable strategy that limits pathogen evolution and immune escape.