The spin-polarized first-principles calculations are performed to study the structure, electronic, magnetic and optical properties of the pure, Mn doped and Mn-X (X = F, CI, Br, I and At) co-doped monolayer WS2 systems. Although the pure monolayer WS2 system is a nonmagnetic semiconductor with a direct band gap of 1.820 eV, the Mn doped (Mn-Br co-doped) monolayer WS2 systems change to half-metal (HM) ferromagnet with a total magnetic moment M-tot of 1 mu(B) (-2 mu(B)) and the spin-down band gap E-g(down arrow) of 1.262 eV (spin-up band gap E-g(up arrow) of 1.321 eV) and thus useable in the spintronic devices. The Mn-F, Mn-Cl, Mn-I and Mn-At co-doped monolayer WS2 systems remain the nonmagnetic semiconducting character with the smaller band gaps E-g of 0.667, 0.578, 0.558, and 0.564 eV, respectively. Comparing the formation energies Eform, we find that it is the lowest for the Mn-F co-doped monolayer WS2 system and increases for the Mn-F, Mn-Cl, Mn-Br, Mn-I and Mn-At co-doped cases successively, indicating the Mn-F co-doped monolayer WS2 system is the most stable. The Mn doped monolayer WS2 system has the highest static dielectric constants epsilon(1)(0) and epsilon(2)(0), refractive indices n(0) and k(0). The absorption coefficients alpha(omega) show the pure monolayer WS2 system has the highest transmittance in low energy region. Meanwhile, the pure monolayer WS2 system has larger absorption from 6 to 9.5 eV and thus is more suitable to make a near-ultraviolet (6-9.5 eV) photodetector, while all doped monolayer WS2 systems are more suitable to make an infrared photodetector due to their red-shift phenomenon. (C) 2017 Elsevier B.V. All rights reserved.