The effect of Co doping on the structural, optical and magnetic properties of sol-gel derived ZnS films was investigated for their dilute magnetic semiconducting behaviour. X-ray diffraction pattern shows nanocrystalline nature of the films. Raman spectroscopy was used to study the vibrational properties of the films and also to identify any kind of secondary phases. The surface morphology and roughness of the films was analysed through scanning electron microscopy and atomic force microscopy. The chemical binding state of Co in ZnS lattice was confirmed from the X-ray photoelectron spectroscopy. The optical band gap is found to be decreasing with the incorporation of Co in ZnS. The red emission ~1.7 eV ensures tetrahedral occupation of Co atoms in ZnS lattice. The observed room temperature ferromagnetism in Co:ZnS films is attributed to carrier induced magnetization as well as to the intrinsic defects. The origin of magnetism in Co:ZnS system was studied in terms of the spin-polarized electronic density of states obtained through the density functional theory. © 2019 Elsevier B.V.