ZnO nanoparticles were embedded in the MgO matrix by the sol-gel technique and were subsequently annealed in the temperature range of 573-873 K in air. The particle radii were around 2.0-3.0 nm at 573 K. The optical transmission spectra of the films recorded at room temperature indicated a blue shift (0.38-1.26 eV) depending on the annealing temperatures and the sizes of the embedded particles. The spectra showed a broadening effect (Urbach tail), indicating structural and temperature related disorders in the nanocrystals. The Urbach tail width decreased with increase in annealing temperatures depicting higher crystalline order. The room temperature photoluminescence spectra showed excitonic emissions of ZnO nanoparticles within 4.50-4.03 eV. The excitonic peak was red shifted with higher annealing temperature due to an increase in the particle size. Broad defect level related peaks were found around 2.19 and 2.03 eV.