Metal-organic frameworks, typically built by bridging metal centres with organic linkers, have recently shown great promise for a wide variety of applications, including gas separation and drug delivery. Here, we have used them as a scaffold to probe the photophysical and photochemical properties of metal-diimine complexes. We have immobilized a M(diimine)(CO)3X moiety (where M is Re or Mn, and X can be Cl or Br) by using it as the linker of a metal-organic framework, with Mn(II) cations acting as nodes. Time-resolved infrared measurements showed that the initial excited state formed on ultraviolet irradiation of the rhenium-based metal-organic framework was characteristic of an intra-ligand state, rather than the metal-ligand charge transfer state typically observed in solution, and revealed that the metal-diimine complexes rearranged from the fac- to mer-isomer in the crystalline solid state. This approach also enabled characterization of the photoactivity of Mn(diimine)(CO)3Br by single-crystal X-ray diffraction.