By their paternal transmission, Y-chromosomal haplotypes are sensitive markers of population history and male-mediated introgression. Previous studies identified biallelic single-nucleotide variants in the SRY, ZFY, DDX3Y genes, which in domestic goats identified four major Y-chromosomal haplotypes Y1A, Y1B, Y2A and Y2B with a marked geographic partitioning. Here, we analyze whole-genome sequences of 386 domestic goats from 75 modern breeds and 7 wild goat species that were generated by the VarGoats goat genome project. Phylogenetic analyses indicated domestic haplogroups corresponding to Y1B, Y2A and Y2B, respectively, whereas Y1A is split into Y1AA and Y1AB. All five haplogroups were detected in 26 ancient DNA samples from southeast Europe or Asia. Haplotypes from present-day bezoars are not shared with domestic goats and are attached to deep nodes of the trees and networks. Haplogroup distributions for 180 domestic breeds indicate ancient paternal population bottlenecks and expansions during the migrations into northern Europe, eastern and southern Asia and Africa south of the Sahara. In addition, sharing of haplogroups indicates male-mediated introgressions, most notably an early gene flow from Asian goats into Madagascar and the crossbreeding that in the 19th century resulted in the popular Boer and Anglo-Nubian breeds. More recent introgressions are those from European goats into the native Korean goat population and from Boer goat into Uganda, Kenya, Tanzania, Malawi and Zimbabwe. This study illustrates the power of the Y-chromosomal variants for reconstructing the history of domestic species with a wide geographic range.