Defensive toxins are widely used by animals, plants and micro-organisms to deter natural enemies. An important characteristic of such defences is diversity both in the quantity of toxins and the profile of specific defensive chemicals present. Here we evaluate evolutionary and ecological explanations for the persistence of toxin diversity within prey populations, drawing together a range of explanations from the literature, and adding new hypotheses. We consider toxin diversity in three ways: (1) the absence of toxicity in a proportion of individuals in an otherwise toxic prey population (automimicry); (2) broad variation in quantities of toxin within individuals in the same population; (3) variation in the chemical constituents of chemical defence. For each of these phenomena we identify alternative evolutionary explanations for the persistence of variation. One important general explanation is diversifying (frequency- or density-dependent) selection in which either costs of toxicity increase or their benefits decrease with increases in the absolute or relative abundance of toxicity in a prey population. A second major class of explanation is that variation in toxicity profiles is itself nonadaptive. One application of this explanation requires that predator behaviour is not affected by variation in levels or profiles of chemical defence within a prey population, and that there are no cost differences between different quantities or forms of toxins found within a population. Finally, the ecology and life history of the animal may enable some general predictions about toxin variation. For example, in animals which only gain their toxins in their immature forms (e.g. caterpillars on host plants) we may expect a decline in toxicity during adult life (or at least no change). By contrast, when toxins are also acquired during the adult form, we may for example expect the converse, in which young adults have less time to acquire toxicity than older adults. One major conclusion that we draw is that there are good reasons to consider within-species variation in defensive toxins as more than mere ecological noise. Rather there are a number of compelling evolutionary hypotheses which can explain and predict variation in prey toxicity.