Crustin is an important antibacterial peptide in crustaceans. In this study, a type IIa crustin was cloned from Portunus trituberculatus and named as PtCrustin5. The PtCrustin5 contained the typical domains of type II crustin such as a signal peptide, a cysteine-rich domain (CRD), a whey acidic protein (WAP) domain and a glycine rich region (GRR). The PtCrustin5 showed the highest transcription in hepatopancreas, and its expression level in hepatopancreas, gills and hemocytes increased after challenging with Vibrio alginolyticus for 3 h and 6 h. The recombinant protein of PtCrustin5 (rPtCrustin5) was obtained and the GRR of PtCrustin5 (PtCrustin5-GRR) was synthesized. The bacterial binding assay showed that PtCrustin5 preferred to bind to the three tested gram-positive bacteria including Staphylococcus aureus, Corynebacteri umglutamicum and Micrococcus lysodeikticus. Moreover, rPtCrustin5 and PtCrustin5-GRR displayed inhibitory activity against the three tested gram-positive bacteria. The inhibitory and bactericidal activities of rPtCrustin5 and PtCrustin5-GRR under different conditions were investigated. The rPtCrustin5 and PtCrustin5-GRR displayed inhibitory activity against S. aureus and C. umglutamicum at relatively low concentration under all the tested conditions, while the inhibitory activity of rPtCrustin5 and PtCrustin5-GRR against M. lysodeikticus was affected by pH and salinity. This study enriched our understanding of the immune functions of type II crustin in defending against bacteria and provided theoretical basis for the application of PtCrustin5 and PtCrustin5-GRR in preventing and treating bacteriosis.