The development of high-performance adsorbents is vital for adsorptive separation. Conventional adsorbents have limitations in combining selective adsorption and efficient desorption due to their fixed surface properties. In this work, we have constructed spiropyran (SP)-based visible-light-responsive adsorbents for controllable CO adsorption by synthesizing SP in situ in Y zeolite via the ship-in-the-bottle method. This avoids the drawbacks associated with the vast majority of systems that modulate adsorption capacity by UV light. SP molecules can undergo reversible isomerization within the Y zeolite, which exhibit the merocyanine (MC) state in the dark and revert to the SP form upon visible light stimulation. The results show that the isomerization of MC to SP leads to a tunable CO adsorption capacity of up to 34%. Simulations performed by density functional theory reveal that MC is more likely to trap CO molecules than SP due to its higher binding energy with CO. We further demonstrate that the isomerization-induced tunable adsorption capacity can be maintained during cycles without degradation.