IS1071, an insertion element that primarily flanks organic xenobiotic degradation genes in cultured isolates, is suggested to play a key role in the formation and distribution of bacterial catabolic pathway gene clusters. However, in environmental settings, the identity of the IS1071 genetic cargo and its correspondence to the local selective conditions remain unknown. To respond, we developed a long-range PCR approach amplifying accessory genes between two IS1071 copies from community DNA followed by amplicon sequencing. We applied this method to pesticide-exposed environments, i.e. linuron-treated agricultural soil and on-farm biopurification systems (BPS) treating complex agricultural wastewater, as to non-treated controls. Amplicons were mainly recovered from the pesticide-exposed environments and the BPS matrix showed a higher size diversity compared to the agricultural soil. Retrieved gene functions mirrored the main selection pressure as (i) a large fraction of the BPS amplicons contained a high variety of genes/gene clusters related to the degradation of organics including herbicides present in the wastewater and (ii) in the agricultural soil, recovered genes were associated with linuron degradation. Our metagenomic analysis extends observations from cultured isolates and provides evidence that IS1071 is a carrier of catabolic genes in xenobiotica stressed environments and contributes to community level adaptation towards pesticide biodegradation.