Genetic codon expansion has the potential to introduce a variety of unnatural amino acids to specific sites within target proteins. In this study, genetic codon expansion was employed to regulate the enzyme expression in metabolic pathways. Firstly, a purple protein from Actinia tenebrosa was selected as the candidate to be engineered. Bringing in UAG stop codon caused premature termination of translation, while expressing orthogonal aminoacyl-tRNA synthetase and tRNA from Methanococcus jannaschii restored translation at UAG site. However, leakage expression was observed without addition of unnatural amino acids, still it can be decreased by increasing numbers of UAG mutations. Subsequently, poly(lactate-co-3-hydroxyburyrate) [P(LA-3HB)] biosynthesis pathway was constructed in Escherichia coli, and propionyl-CoA transferase was mutated to harboring one or two more stop codons. With genetic codon expansion tools, the function of propionyl-CoA transferase was restored, promoting cells to synthesize P(LA-3HB) copolymer. Moreover, the lactate monomer content was regulated ranging from 0 to 33.42 mol% by altering the addition time of inducers. Finally, the strain accumulated 27.09 g/L P(25.1 mol% LA-3HB) in 5-L bioreactor cultivation. This is the first report on metabolic engineering of polyhydroxyalkanoate biosynthesis through genetic codon expansion and would provide helpful strategies to achieve dynamic regulation of multiple metabolic pathways.