The photocatalyst with antimicrobial activity serves as a better candidate material for wastewater treatment, as wastewater contains microbes, hazardous dyes, and heavy metals. Hence, the present study extensively examines the photocatalytic and antibacterial activities against two waterborne bacterial strains, namely Salmonella typhi and Escherichia coli. Pure and Mg-doped ZnS (Mg:ZnS) quantum dots (QDs) were synthesized using a low-cost and simple co-precipitation method. The QDs' structural, surface morphology, chemical purity, and optical characteristics were analyzed through XRD, SEM, EDAX, TEM, UV–visible, and photoluminescence spectra. The incorporation of Mg dopants did not introduce significant alterations to the cubic blende structure of ZnS, nor did it induce substantial changes in the structural parameters. However, the QDs exhibited a slight sulfur deficiency, which was further increased by the presence of Mg dopant. The Mg dopant, due to its dominant compositional effect, reduced the band gap. Several optical emission bands were observed in the UV, violet, blue, and green regions, corresponding to NBE emission, sulfur-related defects, and Zn-related defects. Initially, Mg doping enhanced visible emission related to defects, while NBE emission was suppressed by the Mg dopant. However, increasing the concentration of the Mg dopant led to a slight increase in NBE emission. The Mg dopant enhanced the photocatalytic activity of the QDs, and a strong correlation was found between photocatalytic activity and NBE emission. The presence of the Mg dopant led to an increased rate of ROS-based decolorization by reducing the electron-hole recombination rate.