Selenoproteins contain the amino acid selenocysteine (Sec) and are found in all domains of life. The functions of many selenoproteins are poorly understood, partly due to difficulties in producing recombinant selenoproteins for cell-biological evaluation. Endogenous mammalian selenoproteins are produced through a noncanonical translation mechanism requiring suppression of the UGA stop codon and a Sec insertion sequence (SECIS) element in the 3' untranslated region of the mRNA. Here, recombinant selenoproteins are generated in mammalian cells through genetic code expansion, circumventing the requirement for the SECIS element and selenium availability. An engineered orthogonal E. coli leucyl-tRNA synthetase/tRNA pair is used to incorporate a photocaged Sec (DMNB-Sec) at the UAG amber stop codon. DMNB-Sec is successfully incorporated into GFP and uncaged by irradiation of living cells. Furthermore, DMNB-Sec is used to generate the native selenoprotein methionine-R-sulfoxide reductase B1 (MsrB1). Importantly, MsrB1 is shown to be catalytically active after uncaging, constituting the first use of genetic code expansion to generate a functional selenoprotein in mammalian systems. The ability to site-specifically introduce Sec directly in mammalian cells, and temporally modulate selenoprotein activity, will aid in the characterization of mammalian selenoprotein function.