Pure and different concentration of Ni-doped CeO2 nanoparticles were synthesized using a sol–gel technique. The products were characterized by X-ray diffraction (XRD), UV–Vis absorption and photoluminescence (PL) spectroscopy, Fourier transform infrared spectroscopy (FTIR) and TG-DTA measurements. The XRD analysis dictated that the product has CeO2 crystallites with cubic structure. The average crystallite size varied from 10.98 to 35.43 nm. The SEM-EDAX analysis shows the nature of morphology and the presence of elements. A suitable temperature is selected using TG-DTA analysis to tune the optical band gap. The HR-TEM pictures show that the particles are spherical in shape and affirmed the XRD investigation. The optical properties of the nanoparticles are seen by UV–visible and PL spectroscopy. The structural bond vibrations of pure and Ni-doped CeO2 nanoparticles were analyzed by FTIR spectroscopy. The photocatalytic activity of pure and Ni-doped CeO2 nanoparticles was assessed by methylene blue degradation in an aqueous solution which directed that the 0.1 M.% of the Ni-doped CeO2 show the best photocatalytic movement.