Nanothermochromic diffraction gratings based on the metal-insulator transition of VO2 are fabricated by site-selective ion beam implantation in a SiO2 matrix. Gratings were defined either (i) directly by spatially selective ion beam synthesis or (ii) by site-selective deactivation of the phase transition by ion beam induced defects. The strongest increase of the diffracted light intensities was observed at a wavelength of 1550\,nm exceeding a factor of 20 for the selectively deactivated gratings. The observed pronounced thermal hysteresis extending down close to room temperature makes this system ideally suited for optical memory applications.