Ability of aroylhydrazones to change conformation upon interaction with light makes them promising candidates for molecular switches. Isomerization can be controlled through complexation with selected metal ions which bind with different affinity. N′‐[1‐(2‐hydroxyphenyl)ethyliden]iso‐nicotinoylhydrazide (HAPI) is an example of a dual‐wavelenght photoswitching molecule, whose complexation with metal ions was recently experimentally investigated (Franks et al. J. Inorg. Chem. 2014, 53, 1397). In this contribution, complexes between HAPI and K+, Ca2+, Mn2+, Fe2+, Fe3+, Cu+, Cu2+, and Zn2+ ions were investigated using Density Functional Theory, Natural Bond Order analysis, and Quantum Theory of Atoms in Molecules. The most important parameters that determine complex stability are found to be ion radius and charge transferred from ligands to the ion: smaller ion radii and larger CT values characterize formation of more stable complexes. Our results explain experimentally observed effect of different metal ions on photoisomerization through determination of metal ion affinity (MIA): photoisomerization is inhibited if MIA exceeds 100 kcal/mol; for MIA between 50 and 100 kcal/mol excess of metal ions prevents isomerization, whereas in case of MIA below 50 kcal/mol metal ions have no influence on light–HAPI interaction. © 2015 Wiley Periodicals, Inc.