Beta-lactam biosynthesis was thought to occur only in fungi and bacteria, but we recently reported the presence of isopenicillin N synthase in a soil-dwelling animal, Folsomia candida. However, it has remained unclear whether this gene is part of a larger beta-lactam biosynthesis pathway and how widespread the occurrence of penicillin biosynthesis is among animals. Here, we analyzed the distribution of beta-lactam biosynthesis genes throughout the animal kingdom and identified a beta-lactam gene cluster in the genome of F. candida (Collembola), consisting of isopenicillin N synthase (IPNS), δ-(L-α-aminoadipoyl)-L-cysteinyl-D-valine synthetase (ACVS), and two cephamycin C genes (cmcI and cmcJ) on a genomic scaffold of 0.76 Mb. All genes are transcriptionally active and are inducible by stress (heat shock). A beta-lactam compound was detected in vivo using an ELISA beta-lactam assay. The gene cluster also contains an ABC transporter which is co-regulated with IPNS and ACVS after heat shock. Furthermore, we show that different combinations of beta-lactam biosynthesis genes are present in over 60% of springtail families but they are absent from genome- and transcript libraries of other animals including close relatives of springtails (Protura, Diplura, and insects). The presence of beta-lactam genes is strongly correlated with an eudaphic (soil-living) lifestyle. Beta-lactam genes IPNS and ACVS each form a phylogenetic clade in between bacteria and fungi, while cmcI and cmcJ genes cluster within bacteria. This suggests a single horizontal gene transfer event most probably from a bacterial host, followed by differential loss in more recently evolving species.,DRYAD_Suring_coll_aaFor a detailed description of the data and data depositiion we refer to the Readme file. This file contains taxonomic names of applied species, library IDs used for transcriptome sequencing, NCBI bioproject codes per dataset including NCBI accession numbers. Also, we provide the number of specimens used for RNA extraction, the locations where these animials were sampled, in which life stage they were during sampling, and at what date they were sampled.,