The plant sources can act as potential precursors for the synthesis of nanoparticles in non-hazardous ways as plants contain various secondary metabolites, acting as reducing and stabilizing agents for the reduction reaction to synthesize novel metallic nanoparticles. The green synthesized nanoparticles have been proven to control various diseases with less adverse effect. Thus, in this study, the green method for the preparation of cadmium sulfide nanoparticles using Panicum sarmentosum has been adopted. The synthesized CdSNPs were evaluated for their optical, structural, surface morphological and antibacterial properties. The CdSNPs were characterized by different techniques including UV–vis spectrophotometry, fourier transmission infrared spectroscopy (FT-IR), X-ray diffraction analysis (XRD), scanning electron microscopy (SEM), X-ray fluorescence (XRF) and thermal gravimetric analysis (TGA). The antibacterial activity against Staphylococcus aureus and Escherichia coli was also carried out. The XRD pattern revealed the crystalline structure of CdSNPs. The SEM analysis showed the size and shape of the nanoparticles. XRF analysis confirmed the presence of cadmium and sulphur in nanoparticles. The presence of (OH), (NH) and carboxylic functional groups were confirmed by FTIR analysis. TGA results prove that CdSNPs are more thermally stable than plant material. The ecological friendly methods can generate simple, easy and cost-effective nanoparticles than chemical and physical approaches and have a potential to be used as antibacterial agents.