Elongation factor P (EF-P) accelerates diprolyl synthesis and requires a posttranslational modification to maintain proteostasis. Two phylogenetically distinct EF-P modification pathways have been described and are encoded in the majority of Gram-negative bacteria, but neither is present in Gram-positive bacteria. Prior work suggested that the EF-P-encoding gene (efp) primarily supports Bacillus subtilis swarming differentiation, whereas EF-P in Gram-negative bacteria has a more global housekeeping role, prompting our investigation to determine whether EF-P is modified and how it impacts gene expression in motile cells. We identified a 5-aminopentanol moiety attached to Lys(32) of B. subtilis EF-P that is required for swarming motility. A fluorescent in vivo B. subtilis reporter system identified peptide motifs whose efficient synthesis was most dependent on 5-aminopentanol EF-P. Examination of the B. subtilis genome sequence showed that these EF-P-dependent peptide motifs were represented in flagellar genes. Taken together, these data show that, in B. subtilis, a previously uncharacterized posttranslational modification of EF-P can modulate the synthesis of specific diprolyl motifs present in proteins required for swarming motility.