Defensins are antimicrobial peptides that contribute broadly to innate immunity, including protection of mucosal tissues. Human α-defensin (HD) 6 is highly expressed by secretory Paneth cells of the small intestine. However, in contrast to the other defensins, it lacks appreciable bactericidal activity. Nevertheless, we report here that HD6 affords protection against invasion by enteric bacterial pathogens in vitro and in vivo. After stochastic binding to bacterial surface proteins, HD6 undergoes ordered self-assembly to form fibrils and nanonets that surround and entangle bacteria. This self-assembly mechanism occurs in vivo, requires histidine-27, and is consistent with x-ray crystallography data. These findings support a key role for HD6 in protecting the small intestine against invasion by diverse enteric pathogens and may explain the conservation of HD6 throughout Hominidae evolution.