Genetic code expansion allows unnatural (non-canonical) amino acid incorporation into proteins of interest by repurposing the cellular translation machinery. The development of this technique has enabled site-specific incorporation of many structurally and chemically diverse amino acids, facilitating a plethora of applications, including protein imaging, engineering, mechanistic and structural investigations, and functional regulation. Particularly, genetic code expansion provides great tools to study mammalian proteins, of which dysregulations often have important implications in health. In recent years, a series of methods has been developed to modulate protein function through genetically incorporated unnatural amino acids. In this review, we will first discuss the basic concept of genetic code expansion and give an up-to-date list of amino acids that can be incorporated into proteins in mammalian cells. We then focus on the use of unnatural amino acids to activate, inhibit, or reversibly modulate protein function by translational, optical or chemical control. The features of each approach will also be highlighted.