181Hf and 111In ions were implanted into AlN-layers in order to investigate their immediate lattice site environment and its temperature dependence by means of the Perturbed Angular Correlation (PAC) technique. After rapid thermal annealing at 1273 K up to 50% of the probe atoms were incorporated on undisturbed lattice sites defined by an electric field gradient (EFG) of 33 MHz for In and 572 MHz for Hf for measurement at room temperature. PAC-spectra taken at temperatures between 25 and 1200 K show that the EFG measured at the site of the undisturbed probes changes with temperature. While for Hf it decreases by 3%, for In it increases by 25% within the measured temperature range. Thus, the change cannot be due only to the thermal lattice expansion. In the case of In the fraction of probe atoms on substitutional sites increases with temperature until it reaches nearly 100% at 973 K. These effects are fully reversible. For the Hf probe, an additional EFG was detected at temperatures above 300 K.