Nowadays, there is still a gap in the knowledge of the structure-activity relationship of immunomodulatory peptides. In this study, PFPEVFG was selected as a peptide with immunomodulatory activity from casein hydrolysate by virtual screening and its immunomodulatory activity was verified by the phagocytosis, proliferation, and expression of cytokines (IL-6, IL-1β, TNF-α) and chemokines (CXCL1, CXCL2) in RAW 264.7 macrophages. Next, molecular docking and double-stranded small interfering RNA (siRNA) mutually verified that the immunomodulatory activity of PFPEVFG was mediated by TLR2/4. Furthermore, the highest occupied molecular orbital (HOMO) analysis showed that the C19 = O20 site with a HOMO contribution of 32.22988% was its active site, and the phenylalanine, where the C19 = O20 site was located, was its active amino acid. Finally, the combination of pathway inhibitors and Western blot revealed that PFPEVFG activated macrophages through the nuclear factor-κB (NF-κB) signaling pathway. In summary, this study provided a new perspective on deeply understanding the structure-activity relationship of casein-derived immunomodulatory peptides, as well as a further theoretical and technological basis for the application of immunomodulatory peptides.