Antimicrobial peptides (AMPs) show high antibacterial activity against pathogens, which makes them potential new therapeutics to prevent and cure diseases. Porcine beta defensin 2 (pBD2) is a newly discovered AMP and has shown antibacterial activity against different bacterial species including multi-resistant bacteria. In this study, the functional mechanism of pBD2 antibacterial activity against Staphylococcus aureus was investigated. After S. aureus cells were incubated with different concentrations of pBD2, the morphological changes in S. aureus and locations of pBD2 were detected by electron microscopy. The differentially expressed genes (DEGs) were also analyzed. The results showed that the bacterial membranes were broken, bulging, and perforated after treatment with pBD2; pBD2 was mainly located on the membranes, and some entered the cytoplasm. Furthermore, 31 DEGs were detected and confirmed by quantitative real-time PCR (qRT-PCR). The known functional DEGs were associated with transmembrane transport, transport of inheritable information, and other metabolic processes. Our data suggest that pBD2 might have multiple modes of action, and the main mechanism by which pBD2 kills S. aureus is the destruction of the membrane and interaction with DNA. The results imply that pBD2 is an effective bactericide for S. aureus, and deserves further study as a new therapeutic substance against S. aureus.