Intelligent indicator labels have been widely demonstrated as functional material to real-time monitor the freshness of food, whereas the migration problem of natural pH-sensitive dyes from the matrix into surface of packaging film restricted the practical application. Herein, a facile in situ encapsulation strategy was proposed to design and fabricate soybean protein isolate (SPI)/carboxymethyl cellulose sodium (CMC)/anthocyanin (Anth) (SCA) composite film as smart labels to monitor the freshness of protein-based foods. Inspired by the stimulation-response behaviors of Mimosa, Anth was in situ wrapped by the spatial structural mutation of SPI chains driven by different pH conditions, in which tannic acid (TA) served as pH modulator. Compared to CMC/Anth composite film free of pH modulation, the cumulative release of Anth from SCA-7.0 composite film was decreased from 90.97%, 82.45% and 70.52% to 64.14%, 53.88% and 39.45% in distilled water, 10% ethanol and 90% ethanol, respectively. Furthermore, the prepared SCA-7.0 composite film possessed reinforced UV-shielding, gas barrier and water resistance performances. When employed as intelligent label, this composite film can be an intelligent indicator label for real-time meat freshness monitoring. A facile strategy was carried out to in situ encapsulate the Anth within matrix, boosting the reliability and lifespan of intelligent packaging in practical application.