Nowadays we are facing increasing serious clinical bacterial infections. With the emergence of drug‐resistant bacteria, it was urgently need new antibacterial materials. Antibacterial peptides, metal nanoparticles and other new antibacterial agents have become current research hotspots. Here, we designed a nanomaterial coupled with antimicrobial peptides and gold nanostars. It has good stability in aqueous solution and acts effectively in inhibiting biofilms which ware difficult to clear. At the same time, it can absorb near-infrared laser energy and convert it to heat energy, and use efficient photothermal effect for sterilization. The method reported in this article provides a valuable choice for future antibacterial research.