The transformation of environmental microorganisms by extracellular DNA is an overlooked mechanism of horizontal gene transfer and evolution. It initiates the acquisition of exogenous genes and propagates antimicrobial resistance alongside vertical and conjugative transfers. We combined mixed-culture biotechnology and Hi-C sequencing to elucidate the transformation of wastewater microorganisms with a synthetic plasmid encoding GFP and kanamycin resistance genes, in the mixed culture of chemostats exposed to kanamycin at concentrations representing wastewater, gut and polluted environments (0.01–2.5–50–100 mg L−1). We found that the phylogenetically distant Gram-negativeRunella(102 Hi-C links),Bosea(35),Gemmobacter(33) andZoogloea(24) spp., and Gram-positiveMicrobacteriumsp. (90) were transformed by the foreign plasmid, under high antibiotic exposure (50 mg L−1). In addition, the antibiotic pressure shifted the origin of aminoglycoside resistance genes from genomic DNA to mobile genetic elements on plasmids accumulating in microorganisms. These results reveal the power of Hi-C sequencing to catch and surveil the transfer of xenogenetic elements inside microbiomes.Supplementary InformationThe online version contains supplementary material available at 10.1007/s10482-023-01834-z.