Water is a vital ingredient for life, but its quality is constantly deteriorating due to textile effluent carrying harmful dyes. Photodegradation is a highly effective process for breaking down dye using solar spectrum. In the current work, hydrothermal approach was used to designed pure tungsten disulfide and doped tungsten disulfide with differnet concentration (5, 10, and 15%) for photocatalytic degradation of methylene voilet. Different instrumental analyses were conducted to measure the physichemical and optical properties of the fabricated pure and doped materials. The photocatalytic behavior of the WS2, 5% doped WS2, 10% doped WS2 and 15% doped WS2 was noted after 0, 15, 30, 45, 60, and 75 min under sunlight. The removal of methyl violet (MV) by using pristine WS2, 5% doped WS2, 10% doped WS2 was about 51, 70, and 80%, respectively. The maximum degradation of methylene violet was given by 15% doped WS2 about 90% after 75 min under sunlight. The 15% doping of the Sm reduced the band gap that can effectively absorb the greater extent of the solar spectrum and degrade the methyl violet dye. The fabricated optimized doped photocatalyst can also be employed in other application such as batteries, drug delivery, and water splitting.