Using genetic code expansion, we are able to achieve optochemically controlled protein translocation, for example, from the cytoplasm to the nucleus. A single lysine residue was replaced with a photocaged lysine in a nuclear localization sequence that was appended to green fluorescent protein. The presence of the caging group blocked activity of the nuclear localization sequence, leading to an even distribution of the protein in human cells engineered with an expanded genetic code. However, a brief illumination with light of 365 nm induced caging group removal and complete translocation of the protein into the nucleus within 60 seconds. Due to the defined starting point of this process, the kinetics of the active transport into the nucleus can be precisely determined.