This work reports a new morphology-inheriting methodology for pure and cobalt-doped MgO nanoparticles. MgO nanoparticles (MNPs) and co-doped MgO nanoparticles (CoMNPs) were synthesized at low temperatures using the sol-gel method with various concentrations (1%, 3%, 5%, and 7%) of Co ions. Powder X-ray diffraction (PXRD) was used to analyze the structures of the pure MNPs and CoMNPs, revealing a single cubic phase free of secondary phases after calcination at 600 degrees C. The average crystallite size showed good agreement between the Debye-Scherrer and Hall-Williamson methods, and the FESEM images showed uniform spherical shapes with high crystallinity. Furthermore, the results were corroborated by calculations of the lattice strain and dislocation density. The crystallite size decreased from 14.66 to 11.38 nm (with the Scherrer method) and from 14.88 to 11.67 nm (with the Hall-Williamson method) as the Co doping concentration increased from 1 to 7%, showing a relationship between the two parameters. The effects of MNPs and CoMNPs on the characteristic photoluminescence (PL) peaks and photoluminescence properties of the produced nanoparticles were systematically examined, and both MNPs and CoMNPs were characterized using various techniques, such as FESEM and UV-visible absorption spectroscopy. Using UV-visible spectroscopy, the measurements were recorded in the wavelength range from 200 to 650 nm, and the energy gap values evaluated from Tauc's plot were 5.45 eV for MNPs and 5.62, 5.82, 6.06, and 6.31 eV for 1%, 3%, 5%, and 7% co-doped MNPs, respectively.