The confinement of organic chromophores within mesoporous material architectures can exert a considerable alteration on their physico-chemical properties. This study presents a detailed spectroscopic investigation of methylene blue (MB) entrapped in mesoporous polymeric carbon nitrides (mPCNs) with different pore architecturesusing transient absorption spectroscopy (TAS). The spatial confinement of MB molecules results in a prominent change in absorption spectra, characterized by both redshifts and the appearance of additional shoulder peaks, arising from the formation of MB dimers (MB2) concomitant with a distortion of the MB structure. Upon photoexcitation, entrapped MB molecules exhibit a notable altered excited-state absorption feature, along with a drastic excited-state quenching within 2 ns compared to molecues in bulk solutions. In contrast to the ultrafast quenching of sole MB2 with a lifetime of ~3.6 ps in highly concentrated solutions, the concentration-dependent quenching behavior of MB aggregates in confined environments suggests the effect is caused by excimers formed in close proximity. The findings of this work highlight the impact of constrained environments and intermolecular interactions on the relaxation pathways of the excited states in photoactive molecules.