Avena fatua (weedy oat) is a globally pervasive weed, notorious for its adaptability to extreme environments and herbicide tolerance. Here, we present the 10.98-Gb hexaploid genome of A. fatua and a variation map from 768 wild and cultivated oats (A. fatua, A. sterilis and A. sativa), elucidating their genetic relationship and evolutionary history. Population genomic analyses reveal genetic connections between A. fatua and cultivated naked oats, and identify divergent regions between A. fatua and A. sativa enriched in genes associated with biotic and abiotic stresses. Among them, a herbicide-resistance locus is identified on chromosome 4D, with A. fatua accessions carrying a highly differentiated haplotype from cultivated oats. Multi-omics profiling and functional validation demonstrate that one expanded GST gene in this locus contributes significantly to oat herbicide resistance. Our study provides genomic resources for understanding A. fatua's broad adaptability to diverse environmental conditions, facilitating the development of climate-resilient oat varieties.