A simple route was followed for synthesis zinc sulfide (ZnS) and cadmium sulfide (CdS) nanoparticles with different sizes at ambient temperature. Zinc acetate, zinc chloride, cadmium acetate and cadmium nitrate were utilized as a source for zinc and cadmium ions and sodium sulfide as a source of sulfide ions. Liugstrum valgure leaf extract was used as a capping and dispersing agent. The change of particle size, morphologies and crystal structures with the molar ratio of metal to sulfide salt and amount of Ligustrum valgure leaf extract was obtained from scanning electron microscopy (SEM), transmission electron microscopy (TEM) and X-ray diffraction pattern results. The effect of particle sizes on the optical properties was confirmed from UV–visible data. The optical band gap for ZnS nanoparticles was found to be 4.5 ev and for cadmium sulfide nanoparticles 2.7 ev.