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 and DDX3Y genes, which in domestic goats identified four major Y-chromosomal haplotypes, Y1A, Y1B, Y2A and Y2B, with a marked geographical partitioning. Here, we extracted goat Y-chromosomal variants from whole-genome sequences of 386 domestic goats (75 breeds) and seven wild goat species, which 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 186 domestic breeds indicate ancient paternal population bottlenecks and expansions during 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 geographical range.