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 effectiveness on the control of microbiological contamination in soft cheese with edible 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 preservative in dairy products. Antimicrobial peptides in whey protein films caused an increase of film thickness, opaqueness and water vapor barrier properties, but decreased the mechanical properties. Whey protein film incorporated with αs2-casein151 − 181 could inhibit the growth of yeasts and moulds, and control the growth of psychrotrophic bacteria present originally in the soft cheese at refrigerated temperature. It also exhibited the significantly inhibitory activity against the development of a mixed culture (E. coli and B. subtilis) in the cheese due to a superficial contamination during the storage. Antimicrobial peptides immobilized in whey protein films showed a higher effectiveness than its 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. Development of antimicrobial packaging on the basis of whey protein could be one effective way to reduce environment unfriendly plastic and whey protein waste for further application.