In this study, we demonstrate the feasibility of expanding the genetic code of Escherichia coli using its own tryptophanyl-tRNA synthetase and tRNA (TrpRS-tRNATrp) pair. This was made possible by first functionally replacing this endogenous pair with an E. coli-optimized counterpart from Saccharomyces cerevisiae, and then reintroducing the liberated E. coli TrpRS-tRNATrp pair into the resulting strain as a nonsense suppressor, which was then followed by its directed evolution to genetically encode several new unnatural amino acids (UAAs). These engineered TrpRS-tRNATrp variants were also able to drive efficient UAA mutagenesis in mammalian cells. Since bacteria-derived aminoacyl-tRNA synthetase (aaRS)-tRNA pairs are typically orthogonal in eukaryotes, our work provides a general strategy to develop additional aaRS-tRNA pairs that can be used for UAA mutagenesis of proteins expressed in both E. coli and eukaryotes.