The pyrrolysyl-tRNA synthetase (PylRS) is widely used to incorporate noncanonical amino acids (ncAAs) into proteins. However, most of ncAA-containing protein yields remain low due to the limited activity of PylRS variants. Here, we apply machine learning (ML) to engineer the tRNA-binding domain of PylRS. The FFT-PLSR model is first applied to explore pairwise combinations of 12 single mutations, generating a variant Com1-IFRS with an 11-fold increase in stop codon suppression efficiency. Deep learning models ESM-1v, Mutcompute, and ProRefiner then identify new mutation sites. Applying FFT-PLSR on these sites yields a variant Com2-IFRS showing a 30.8-fold increase in stop codon suppression efficiency. Transplanting these mutations into 7 other PylRS-derived synthetases improved ncAA-containing protein yield by up to 1149.7-fold. Molecular dynamics simulations are used to explore the molecular change caused by the mutations. This paper presents improved PylRS variants and a machine learning framework for optimizing the enzyme activity.