In mammalian females, two X chromosomes are epigenetically distinguished as active and inactive chromosomes to balance X-linked gene dosages between males and females. How the Xs are maintained differently in the same nucleus remains unknown. Here, we demonstrate that the inactive X (Xi) is targeted to a distinct nuclear compartment following pairing with its homologous partner. During mid-to-late S phase, 80%-90% of Xi contact the nucleolus and reside within a Snf2h-enriched ring. Autosomes carrying ectopic X-inactivation center sequences are also targeted to the perinucleolar compartment. Deleting Xist results in a loss of nucleolar association and an inability to maintain Xi heterochromatin, leading to Xi reactivation at the single gene level. We propose that the Xi must continuously visit the perinucleolar compartment to maintain its epigenetic state. These data raise a mechanism by which chromatin states can be replicated by spatial and temporal separation in the nucleus.