Spintronics is a particularly hot topic in recent years, which has aroused much attention. The spin freedom of electrons can be used to construct logic devices and memory devices. Generally, the most important spintronic properties are found in half-metal ferromagnets, which are considered as the ideal materials for building spintronic devices due to their ability to provide fully spin-polarised conduction electrons. Numerous experimental data and theoretical studies have confirmed that the intercalation, doping and adsorption of transition metal atoms can induce magnetic properties in two-dimensional WS
2material. Therefore, half-metal ferromagnets formed by doping WS
2play an important role in the field of spintronics. In this paper, we investigate the electronic structure, magnetic and optical properties of the WS
2doped with transition metal atoms
X(
X= Mn, Tc, Re) by the first-principles plane wave method based on density functional theory. The results show that the WS
2system doped with transition metal atoms
Xis more stable under S-rich condition than under W-rich condition. Especially, the WS
2system doped with Tc has a minimum value of formation energy of –1.292 eV under S-rich condition. After doping with Mn, impurity levels appear in the spin-up channels, resulting in the WS
2system changing from a non-magnetic semiconductor to half-metal ferromagnet with a magnetic moment of 1.001
$ {\text{μ}}_{\text{B}} $
. Moreover, in the Mn-doped system, the densities of states are asymmetric in the spin-up channel and the spin-down channel. After being doped with Tc and Re, the systems are transformed into non-magnetic N-type semiconductors, and the densities of states in spin-up and spin-down channels are symmetric in Tc doping system and Re doping system. Whereafter, the spin orbit splitting of the impurity states near the Fermi level
E
Fdecreases successively from Mn to Re doped WS
2systems. Compared with the undoped two-dimensional WS
2, the transition metal atoms
Xdoped WS
2systems show that all doped systems not only have a significant red shift of optical absorption edges but also enhance peak value in infrared and visible light region, implying that the transition metal atoms
Xdoped WS
2systems have great application prospects in infrared and visible light detection. We hope that thepresent study of two-dimensional WS
2will provide useful theoretical guidance for future experiments to explore low-dimensional spintronic materials.