We present a study on incorporating spiropyran photoactive molecules into the UiO-66-NH2 scaffold. Initially, we modified spiropyran molecules by introducing functional groups to facilitate covalent bonding with the MOF structure. Spiropyran molecules with carboxylic groups demonstrated the ability to coordinate zirconium in defect pores of the MOF. Alternatively, the aldehyde group showed potential for forming C–N bonds with amino groups of BDC-NH2 linkers. To validate the formation of C–N bonds within the MOF scaffold, we synthesized a complex salt of spiropyran and individual BDC-NH2 linkers. DFT calculations support our conclusions. We observed that upon introducing the photoactive moiety, the UiO-66-NH2 framework exhibited photoresponse, as demonstrated by FTIR experiments. Based on experimental data and computational results, we hypothesize that both incorporation mechanisms are viable in the functionalization process. However, steric hindrances may impede the incorporation of spiropyran into the pores, leading to surface modification instead. The elucidated mechanisms hold promise for the development of photoresponsive MOF-based smart materials.