The invention relates to a method for expressing an antibacterial peptide apidaecin by using Escherichia coli and for preparing the antibacterial peptide apidaecin. The method comprises the following steps: cloning AP2 gene and a polyhedron gene sequence polh into a recombinant vector in order to form a recombinant vector with a polh-AP fusion gene fragment; cloning the polh-AP fusion gene fragment into an expression vector, converting the expression vector to an expression host cell, and culturing the expression host cell to express a fusion protein with an antibacterial peptide AP2; and culturing the expression host cell to induce the expression of the recombinant protein polh-AP, centrifuging induced bacterial strains, collecting, re-suspending, carrying out ultrasonic fragmentation, centrifuging, collecting the above obtained insoluble inclusion body, purifying, and collecting a recombinant protein sample. An expression system has the characteristics of simple expression system culture program, low production cost, efficient expression of the antibacterial peptide apidaecin, and realization of AP2 and polh fusion expression, so compared with the prior art, the method has the advantages of effective reduction of toxicity of the AP2 to Escherichia coli, improvement of the stability of the antibacterial peptide, realization of high level expression of the antibacterial peptide, convenient purification of the active antibacterial peptide, and improvement of the output of the antibacterial peptide apidaecin.