An evolutionary scenario incorporating recent advances in phylogenetic research begins with an opisthobranch-pulmonate common ancestor that was herbivorous and had some diet-derived chemical defense. The Nudibranchia and their closest relatives, the Notaspidea, form a lineage the ancestors of which had switched to feeding upon sponges and deriving protection from metabolites contained in them. Subsequently there have been repeated shifts in food and defensive metabolites, and trends are evident in the ability to detoxify, sequester and utilize metabolites from food, as well as to synthesize defensive compounds de no6o. The Notaspidea display a minor adaptive radiation that foreshadows a more extensive one in the various lineages of nudibranchs. This review emphasizes changes that have occurred within the Holohepatica, or dorid nudibranchs (order Doridacea). Their sister-group, the Cladohepatica, consists of three other orders, Dendronotacea, Arminacea, and Aeolidiacea, in which there has been a shift from sponges to Cnidaria as food. The Dendronotacea often feed upon Octocorallia, which combine spicules, chemical defense, and stinging capsules and thereby suggest a transition from feeding on sponges. A previous diet of Octocorallia is suggested by the defensive use of prostaglandins in the dendronotacean Tethys fimbria, which eats crustaceans. A shift to bryozoans in some Arminacea is accompanied by use of different metabolites. Dorid nudibranchs evidently began as sponge-feeders, but some lineages have shifted to a variety of other food organisms, and others have specialized in the kind of sponges they feed on and how they do it. There have been shifts to bryozoans (Ectoprocta) and ascidians (Chordata: Urochordata) that track metabolites rather than the taxonomy of the food. There is a crude correlation between the genealogy and the defensive metabolites of the sponge-feeding dorids.De no6o synthesis is well documented in this order and the metabolites are appropriately positioned so as to have an adaptive effect. The hypothesis that the capacity for de no6o synthesis was acquired by gene transfer across lineages is rejected, partly on the basis of different chirality of metabolites in the nudibranchs and their food organisms. Instead it is proposed that there has been a preadaptive phase followed by evolution in a retrosynthetic mode, with selection favoring enzymes that enhance the yield of end products that are already present in the food.