The invention discloses a pH-responsive non-helix-helix transition antibacterial polypeptide and a preparation method thereof. The method uses glutamic acid, an essential amino acid with biocompatibility, as a raw material, combined with the click chemistry method, to obtain a cationic polypeptide with a helical structure, which is prepared by modifying half of the maleic anhydride derivative through the side chain of the cationic polypeptide with a helical structure. The pH-responsive non-helical-helical transition antibacterial polypeptide has simple process, convenient operation and low cost, and can efficiently realize the secondary structure transformation under specific pH conditions, effectively reduce the biotoxicity of cationic polypeptides, and improve the bioavailability of cationic polypeptides Spend. In the present invention, through the modification of acid anhydrides with different pH responses, non-helical-helical transition antibacterial polypeptides with different pH conditions can be obtained, and the transformation from a low-activity non-helical structure to a high-activity helical structure can be realized under different physiological conditions. The conversion of cationic peptides can kill bacteria at the site of infection, which has broad application prospects.