Food packaging that impedes microbial growth and can be safely used is critical to attenuate food spoilage. Herein, a green berberine/phytate salt (BPA) is successfully synthesized and aggregated in polyvinyl alcohol (PVA) film to impart fluorescent and photodynamic antimicrobial properties. Compared to berberine hydrochloride (BHL), BPA exhibited stronger fluorescence because intramolecular motions and intermolecular π–π accumulation of BHL are restricted by phytic acid (PA). Molecular dynamics simulation indicate that aggregation of BHL and PA formed through electrostatic interactions in the PVA matrix due to the change of the binding energy during the drying process. With increasing BPA content, the films exhibited increased ultraviolet, water vapor, and oxygen barriers and fluorescent properties, but reduced tensile strength and elongation at break. After radiated, PVA‐BPA9 film showed the highest antimicrobial rates against Staphylococcus aureus, Escherichia coli, P. citrinum, and Aspergillus niger reached 100%, 100%, 86.14%, and 66.24%, respectively, due to the increased reactive oxygen species production. The total number of microbial colonies in cooked chicken and oranges packaged by PVA‐BPA9 film with irradiation ARE 87.54% and 29.21% of those by PVA film. The findings indicate a new and feasible strategy to obtain a green photodynamic‐mediated film for safe and effective food packaging.