The reference genome plays a crucial role in uncovering genomic variations, which increase our understanding of the molecular mechanisms influencing biological traits. However, most of the sheep reference genomes derive from a single sheep individual, which couldn't adequately represent the genetic diversity of sheep. The map-to-pan strategy was used to construct the sheep pan-genome based on 801 samples with short read whole genome sequencing data including 724 domestic individuals from 151 sheep populations/breeds and 77 wild individuals from seven genus Ovis species, and a total of 195 Mb of nonreference sequences were assembled that absent from the ARS-UI_Ramb_v2.0 reference. MAKER2 pipeline, integrating ab initio gene prediction, RNA-Seq, and protein homology was used to annotate the nonreference sequences. As a result, a total of additional 2678 genes were predicted in the nonreference sequences. We also identified 13,317 novel single nucleotide polymorphisms (SNPs) by mapping the sequences that could not be aligned to ARS1-UI_Ramb_v2.0 to the nonreference sequences. Population genetic analysis, including principal component analysis (PCA), phylogenetic tree, and ADMIXTURE based on the novel SNPs revealed a clear phylogenetic relationship of the world's domestic sheep, as well as their close wild relatives. Additionally, pangenome-wide presence and absence variations (PAVs) analysis exhibited a decreasing trend in gene number from wild populations to domestic populations. Several genes, GZMH, NFE2L3, GPR146 and CALHM6 with significant changes of presence frequencies during the evolutionary history of sheep were identified by PAV selection analysis. Functional annotation revealed that these genes were primarily associated with immune responses. Our results highlight the implications of the sheep pan-genome in identifying previously unknown genetic variations. PAVs can be used to track and reveal the changes in genomic architecture throughout the evolutionary history of sheep, such as, gene loss. The genes, GZMH, NFE2L3, GPR146 and CALHM6 related to immune regulation and inflammatory responses may play important roles during the domestication history of sheep. These findings broaden our knowledge about the genetic diversity in sheep genomes, and provide insight into the domestication and breeding history of sheep.