Danaus chrysippus is a danaid butterfly commonly found throughout Africa. It feeds, in its larval stage, on species of milkweed (fam. Asclepiadacae). If the milkweed species has a high cardenolide content, then the larva as well as its pupa and the subsequent adult will be toxic to birds. If, however, the larva has fed on a species of milkweed with little or no cardenolide content, then it will be palatable to birds and so will the pupa and the adult. All the three stages (larval, pupa and adult), whether palatable or not, are subject to attack by birds. The larvae, on the other hand, also act as hosts to a large number of parasitoids. In this paper a theoretical model is described which incorporates the following three assumptions that have been verified experimentally: (i) female butterflies prefer to oviposit on the species of plants on which they had developed; (ii) birds are able to distinguish between externally identical larvae from the shape of the plant on which the larvae are feeding; (iii) female parasitoids select, for oviposition, D. chrysippus larvae feeding on plants toxic to vertebrate predators. The simulations using the theoretical model predicts that parasitoids will prefer to lay their eggs in toxic larvae that are less likely to be predated by birds. This predation makes it advantageous for larvae to feed on non-toxic plants. This larval advantage is countered at the adult stage by bird predation. As one type of butterfly becomes too common, the other type will be at an advantage. The polymorphism for palatability is maintained primarily through selection at the larval stage and not by bird predation on the adult butterflies. The experimental data supporting the above assumptions are discussed. Computer simulation predicts the behaviour of birds and parasitoids as it affects the relative frequency of toxic and non-toxic butterflies.