Nisin is the first FDA-approved antimicrobial peptide and shows significant antimicrobial activity against Gram-positive bacteria, but only a weakly inhibitory effect on Gram-negative bacteria. The aim of this study was to prepare whey protein-based edible films with the incorporation of milk-derived antimicrobial peptides (αs2-casein151–181 and αs2-casein182–207) and compare their mechanical properties and potential application in cheese packaging with films containing nisin. These two antimicrobial peptides showed similar activity against B. subtilis and much higher activity against E. coli than bacteriocin nisin, representing that these milk-derived peptides had great potential to be applied as food preservatives. Antimicrobial peptides in whey protein films caused an increase in film opaqueness and water vapor barrier properties but decreased the tensile strength and elongation at break. Compared to other films, the whey protein film containing αs2-casein151–181 had good stability in salt or acidic solution, as evidenced by the results from scanning electron microscope and Fourier transform infrared spectroscopy. Whey protein film incorporated with αs2-casein151–181 could inhibit the growth of yeasts and molds, and control the growth of psychrotrophic bacteria present originally in the soft cheese at refrigerated temperature. It also exhibited significant inhibitory activity against the development of mixed culture (E. coli and B. subtilis) in the cheese due to superficial contamination during storage. Antimicrobial peptides immobilized in whey protein films showed a higher effectiveness than their direct application in solution. In addition, films containing αs2-casein151–181 could act as a hurdle inhibiting the development of postprocessing contamination on the cheese surface during the 28 days of storage. The films in this study exhibited the characteristics desired for active packaging materials.