Engineered fluorescent proteins have been extensively used in biological research for the study of gene expression, protein function and trafficking, and protein-protein interactions. In addition, fluorescent proteins have also been engineered to act as biosensing agents to detect intracellular signaling molecules and other small-molecule metabolites. Although they have been engineered extensively to achieve novel properties, fluorescent proteins are traditionally modified using the 20 canonical amino acids. This limits the number of functional groups that are available to the design and construction of novel fluorescent proteins. The expansion of the genetic code through the incorporation of noncanonical amino acids presents an opportunity to add new functionalities with the intent of modifying chemical and physical properties of fluorescent proteins. Herein we provide a general procedure for the site-specific incorporation of noncanonical amino acids into fluorescent proteins in live cells. We will also discuss a noncanonical amino acid-containing fluorescent protein sensor that is based on a general protection-deprotection design strategy, for the selective detection and quantification of Hg2 +.