Abstract Females of the rove beetle genus Paederus (Coleoptera: Staphylinidae) accumulate large amounts of the defensive compound pederin produced by an endosymbiotic bacterium. Pederin is transferred in the eggs, while the endosymbionts are transmitted via the egg shell. In all three species analyzed (P. melanurus, P. riparius, and P. sabaeus), descendants of aposymbiotic matrilines (lacking both endosymbionts and biosynthetic capabilities) acquire biosynthetic capability by the ingestion of eggs with endosymbionts during larval development. Successful colonization by endosymbionts depends on the number of eggs consumed and the age of the feeding larvae. During the adult stage, however, the females cannot acquire biosynthetic capabilities. Adult females are able to sequester pederin from eggs eaten, and they transfer the substance into their own eggs. Lack of intrinsic biosynthesis after ingestion of endosymbionts indicates that these are not biosynthetically active within the gut and have to reach an unknown internal location before completion of metamorphosis. These results are discussed with regard to the benefit of intraspecific cannibalism.