Several β2-microglobulin (B2M) -bound protein complexes undertake key roles in various immune system pathways, including the neonatal Fc receptor (FcRn), cluster of differentiation 1 (CD1) protein, non-classical major histocompatibility complex (MHC), and well-known MHC class I molecules. Therefore, the duplication of B2M may lead to an increase in the biological competence of organisms to the environment. Based on the pig genome assembly SSC10.2, a segmental duplication of ~45.5 kb, encoding the entire B2M protein, was identified in pig chromosome 1. Through experimental validation, we confirmed the functional duplication of the B2M gene with a completely identical coding sequence between two copies in pigs. Considering the importance of B2M in the immune system, we performed the phylogenetic analysis of B2M duplication in ten mammalian species, confirming the presence of B2M duplication in cetartioldactyls, like cattle, sheep, goats, pigs and whales, but non-cetartiodactyl species, like mice, cats, dogs, horses, and humans. The density of long interspersed nuclear element (LINE) at the edges of duplicated blocks (39 to 66%) was found to be 2 to 3-fold higher than the average (20.12%) of the pig genome, suggesting its role in the duplication event. The B2M mRNA expression level in pigs was 12.71 and 7.57 times (2-ΔΔCt values) higher than humans and mice, respectively. However, we were unable to experimentally demonstrate the difference in the level of B2M protein because species specific anti-B2M antibodies are not available. We reported, for the first time, the functional duplication of the B2M gene in animals. The identification of partially remaining duplicated B2M sequences in the genomes of only cetartiodactyls indicates that the event was lineage specific. B2M duplication could be beneficial to the immune system of pigs by increasing the availability of MHC class I light chain protein, B2M, to complex with the proteins encoded by the relatively large number of MHC class I heavy chain genes in pigs. Further studies are necessary to address the biological meaning of increased expression of B2M.