Milk is a popular source of antimicrobial peptides (AMPs). Therefore, this study aimed to investigate antibacterial activity of fractions and peptides derived from casein hydrolysate. Casein protein was hydrolyzed using the trypsin enzyme and the hydrolyzate was fractionated with a strong cationic exchange (scx) cartridge at a pH 3–9 buffer. The results showed that the pH 5–8 fraction demonstrated antibacterial activity against Staphylococcus aureus and Escherichia coli. The pH 6 fraction had the greatest activity against S. aureus and E. coli, with inhibition zone of 8.00 and 2.00 mm, respectively. Peptides in the pH 6 fraction, namely YNVPQLEIVPK (P1), KENINELSK (P2), GLSPEVPNENLLR (P3), and YLGYLEQLLK (P4) were tested for the activity against S. aureus and E. coli. Based on the results, synthetic peptide P1, P2, P3, and P4 have activity against S. aureus and E. coli. Peptide P3 showed higher activity than others with an inhibition zone of 4.55 and 6.60 mm in S. aureus and E. coli, respectively. Peptide P4 showed an amphipathic structure and good physicochemical properties as a cell‐penetrating peptide. A strong interaction was also observed between peptide P4 and enzyme MurC with a binding affinity of −6.6 kcal/mol.