Molecular dynamics (MD) simulation was applied to study the configuration of metal (Mg, Co, Fe) porphyrin complexes encapsulated in Y-type (USY, NaY) zeolites. In absence of exchanged cations the metal center interacts with framework oxygen atoms and a low catalytic activity of the porphyrin-zeolite system is expected. However, in presence of exchanged cations, which interact with framework oxygen atoms, the metal center is available to interact with reactants and a good catalytic activity of the porphyrin-zeolite system is expected.