The structural and coordination properties of complexes formed upon the interaction of copper(II) and chromium(II) chlorides with dialkylimidazolium chloride (RMIm+Cl-) ionic liquids and glucose are studied by a combination of density functional theory (DFT) calculations and X-ray absorption spectroscopy (XAS). In the absence of the carbohydrate substrate, isolated mononuclear four-coordinated MeCl42- species (Me = Cu, Cr) dominate in the ionic liquid solution. The organic part of the ionic liquid does not directly interact with the metal centers. The interactions between the RMIm+ cations and the anionic metal chloride complexes are limited to hydrogen bonding with the basic Cl- ligands and the overall electrostatic stabilization of the anionic metal complexes. Exchange of Cl- ligands by a hydroxyl group of glucose is only favorable for CrCl42-. For Cu2+ complexes, the formation of hydrogen bonded complexes between CuCl42- and glucose is preferred. No preference for the coordination of metal chloride species to specific hydroxyl group of the carbohydrate is found. The formation of binuclear metal chloride complexes is also considered. The reactivity and selectivity patterns of the Lewis acid catalyzed reactions of glucose are discussed in the framework of the obtained results.