Genomic imprinting first evolved in mammals around the time that humans last shared a common ancestor with marsupials and monotremes (180-210 million years ago). Recent comparisons of large imprinted domains in these divergent mammalian groups have shown that imprinting evolved haphazardly at various times in different lineages, perhaps driven by different selective forces. Surprisingly, some imprinted domains were formed relatively recently, using non-imprinted components acquired from unexpected genomic regions. Rearrangement and the insertion of retrogenes, small nucleolar RNAs, microRNAs, differential CpG methylation and control by non-coding RNA often accompanied the acquisition of imprinting. Here, we use comparisons between different mammalian groups to chart the course of evolution of two related epigenetic regulatory systems in mammals: genomic imprinting and X-chromosome inactivation.