Changes in the transcriptional state of genes have been correlated with their repositioning within the nuclear space. Tethering reporter genes to the nuclear envelope alone can impose repression and recent reports have shown that, after activation, certain genes can also be found closer to the nuclear periphery. The molecular mechanisms underlying these phenomena have remained elusive. Here, with the use of dynamic three-dimensional tracking of a single locus in live yeast (Saccharomyces cerevisiae) cells, we show that the activation of GAL genes (GAL7, GAL10 and GAL1) leads to a confinement in dynamic motility. We demonstrate that the GAL locus is subject to sub-diffusive movement, which after activation can become constrained to a two-dimensional sliding motion along the nuclear envelope. RNA-fluorescence in situ hybridization analysis after activation reveals a higher transcriptional activity for the peripherally constrained GAL genes than for loci remaining intranuclear. This confinement was mediated by Sus1 and Ada2, members of the SAGA histone acetyltransferase complex, and Sac3, a messenger RNA export factor, physically linking the activated GAL genes to the nuclear-pore-complex component Nup1. Deleting ADA2 or NUP1 abrogates perinuclear GAL confinement without affecting GAL1 transcription. Accordingly, transcriptional activation is necessary but not sufficient for the confinement of GAL genes at the nuclear periphery. The observed real-time dynamic mooring of active GAL genes to the inner side of the nuclear pore complex is in accordance with the 'gene gating' hypothesis.