A complete goat (Capra hircus) reference genome enhances analyses of genetic variation, thus providing novel insights into domestication and selection in goats and related species. Here, we assembled a telomere-to-telomere (T2T) gap-free genome (2.86 Gb) from a cashmere goat (T2T-goat1.0), which included a Y chromosome of 20.9 Mb. With a base accuracy of >99.999%, T2T-goat1.0 corrected numerous genome-wide structural and base errors in previous assemblies and added 288.5 Mb of previously unresolved regions (PURs) and 446 newly assembled genes to the reference genome. We sequenced the genomes of five representative goat breeds for PacBio reads, and used T2T-goat1.0 as a reference to identify a total of 63,417 structural variations (SVs) with up to 4711 SVs (7.41%) in the PURs and 507 overlapping genes significantly enriched (Padj. < 0.05) in the keratin filament pathway. T2T-goat1.0 was applied in population analyses of global wild and domestic goats, which revealed 32,419 SVs and 25,397,794 SNPs, including 870 SVs and 545,026 SNPs in the PURs. Also, our analyses revealed a set of novel selective variants and genes associated with domestication (e.g., NKG2D and ABCC4) and cashmere traits (e.g., ABCC4 and ASIP).