The intramolecular proton-transfer reaction of 8-hydroxyimidazo[1,2-a]pyridine (HIP) is studied in both the ground (S 0 ) and first singlet excited (S 1 ) electronic states. Ab initio calculations at the HF/MP2 and CIS/MP2 levels, respectively for S 0 and S 1 , reveal the existence of two tautomers. In gas phase the enol (E) form is the more stable one in S 0 , whereas in S 1 the zwitterionic (Z) tautomer becomes the lowest in energy. The energy barrier for the proton-transfer process is quite high in both electronic states. Introduction of one water molecule in the system greatly changes the picture of the whole process. A 1:1 complex involving two hydrogen bonds between HIP and water is formed. The H-bond bridge greatly facilitates the proton transfer in both S 0 and S 1 states. Additionally, for the two considered electronic states the Z structure is more stabilized than the E one. The trends of lowering the energy barrier and stabilizing the Z structure with respect to E are more prominent when the bulk effect of the solvent is introduced through a continuum (i.e. cavity) model. The energy profiles obtained for both S 0 and S 1 allow prediction of the electronic spectra of HIP in different media.