Non-ribosomal peptide synthetases (NRPSs) and their tailored enzymes have diverse biological functions. In this study, we investigated the biosynthesis and function of chitinimides, which belong to the non-ribosomal peptide (NRP) subfamily featuring a pyrrolidine-containing part (X part) connected to the polypeptide chain via an ester bond. A conserved gene cassette, chmHIJK, is responsible for oxyacylation of the pyrrolidine moiety in the X part. The thioesterase (TE) domain of ChmC (ChmC-TE) catalyzes transesterification reactions with a free X part or methanol as a nucleophilic reagent to form different chitinimides. The crucial amino acid residues in the ChmC-TE domains responsible for the specific recognition of the X part were identified, and they were conserved in all the biosynthetic pathways of this NRP subfamily to form a signature motif, YNHNR, suggesting a special type of TE domain in NRPSs. Chitinimides demonstrate the biological function of promoting the swarming ability of the native producer. This study provides deep insights into the biosynthesis of this special NRP subfamily, and shows that the special TE domain could be used to generate diverse NRPs by combinatorial biosynthesis.