The foam properties of egg white protein play a significant role in the food industry, particularly for pastry products, influencing both the quality and market value. However, foam generated by the continuous air injection into egg white protein tend to collapse over time due to thermodynamic instability. The molecular weight and structure of protein are crucial factors affecting foaming capacity and stability. Herein, the magnetic papain/nanoflowers were utilized to specifically hydrolyze proteins through confinement space effects, thereby enhancing the foam properties of egg white protein. By the cleavage with MPNFs, high molecular weight proteins were converted into proteins of appropriate molecular weight (48-35 kDa), exposing the hydrophobic amino acids inside. The foam capacity of egg white protein catalyzed by MPNF2 was 2.0-fold higher than that of untreated egg white protein, and the foam remained stable over a 3-h storage period.