In the present work, we have interested to understand the influence of cobalt doping on the various properties of ZnO nanoparticles, a series of samples were successfully synthesized using sol–gel auto-combustion method. The effects of Co doping on the structural and optical properties of ZnO:Co nanoparticles were investigated using X-ray diffraction (XRD), scanning electron microscopy, fourier transform infrared (FTIR) spectroscopy, ultraviolet–visible spectroscopy, photoluminescence spectroscopy and vibrating sample magnetometer (VSM). With the sensitivity of the XRD instrument, the structural analyses on the undoped and Co-doped ZnO samples reveal the formation of polycrystalline hexagonal-wurtzite structure without any secondary phase. FTIR spectra confirm the formation of wurtzite structure of ZnO in the samples. The optical absorption spectra showed a red shift in the near band edge which indicates that Co2+ successfully incorporated into the Zn2+ lattice sites. The room temperature PL measurements show a strong UV emission centered at 392 nm (3.16 eV), ascribed to the near-band-edge emissions of ZnO and defect related emissions at 411 nm (violet luminescence), 449 nm (blue luminescence) and 627 nm (orange-red luminescence), respectively. Magnetic study using VSM reveals that all the samples are found to exhibit room temperature ferromagnetism.