This study aimed to probe the effect of heat treatment on zinc oxide nanoparticles doped with ruthenium through a chemical co-preparation technique. Pure ZnO and Ru-doped ZnO nanoparticles, with the general formula Zn1−x−RuxO, were synthesized for 0 ≤ x ≤ 0.04. Using the same starting precursors, the growth temperature was 60 °C and 80 °C for set A and set B, respectively, whereas the calcination temperature was 450 °C and 550 °C for set A and set B, respectively. For the structure investigation, X-ray powder diffraction (XRD) revealed that the crystallite size of set A was smaller than that of set B. For x = 0.04 in set B, the maximum value of the crystallite size was attributed to the integration of Ru3+ ions into interstitial sites in the host causing this expansion. Fourier transform infrared spectroscopy (FTIR) confirmed the formation of zinc oxide nanoparticles by showing a Zn-O bonding peak at 421 cm−1. For x = 0.04 in set B, the divergence confirmed the change in bonding properties of Zn2+ distributed by Ru3+ doping, which verifies the presence of secondary-phase RuO2. Using UV–visible spectroscopy, the energy gap of set A swings as ruthenium doping increases. However, in set B, as the crystallite size decreases, the energy gap increases until reversing at the highest concentration of x = 0.04. The transition from oxygen vacancy to interstitial oxygen, which is associated with the blue peak (469 nm), increases in set A under low heating conditions and decreases in set B as Ru doping increases, as revealed in the photoluminescence optical spectra of the samples. Therefore, ruthenium doping proves a useful surface defect and generates distortion centers in the lattice, leading to more adsorption and a remarkable advantage in sunscreen and paint products used for UV protection.