As a widely studied photochromic dye, spiropyran has a few drawbacks to be resolved: unavailability of precise ring-opened merocyanine forms (MC isomers) in common solvents and lack of good controllability on the photoswitching effect that is always sensitive to UV/Vis light. In the present study, we reported that spiropyran could act as a proton acceptor and catalyze protonated poly(2-aminoethyl methacrylate) to produce amide bridging sites caging spiropyran. Different from any known spiropyran systems, the in situ self-caged spiropyran was identified in a precise TTC configuration, showing drastically narrowed absorption and fluorescence bands and greatly enhanced photostability, with photochromic activity fully suppressed due to the freezing of molecular motions by the polymeric scaffolds. Benefiting from the self-caging process, a new regulation strategy has been developed to modulate the photochromic property of polymer-caging spiropyrans by external stimuli such as mechanical force and temperature.