Computational grafting of functional motifs onto scaffold proteins is a promising way to engineer novel proteins with pre-specified functionalities. Typically, protein grafting involves the transplantation of protein side chains from a functional motif onto structurally homologous regions of scaffold proteins. Using this approach, we previously transplanted the human immunodeficiency virus 2F5 and 4E10 epitopes onto heterologous proteins to design novel "epitope-scaffold" antigens. However, side-chain grafting is limited by the availability of scaffolds with compatible backbone for a given epitope structure and offers no route to modify backbone structure to improve mimicry or binding affinity. To address this, we report here a new and more aggressive computational method-backbone grafting of linear motifs-that transplants the backbone and side chains of linear functional motifs onto scaffold proteins. To test this method, we first used side-chain grafting to design new 2F5 epitope scaffolds with improved biophysical characteristics. We then independently transplanted the 2F5 epitope onto three of the same parent scaffolds using the newly developed backbone grafting procedure. Crystal structures of side-chain and backbone grafting designs showed close agreement with both the computational models and the desired epitope structure. In two cases, backbone grafting scaffolds bound antibody 2F5 with 30- and 9-fold higher affinity than corresponding side-chain grafting designs. These results demonstrate that flexible backbone methods for epitope grafting can significantly improve binding affinities over those achieved by fixed backbone methods alone. Backbone grafting of linear motifs is a general method to transplant functional motifs when backbone remodeling of the target scaffold is necessary.