We report a detailed investigation of the electronic and magnetic properties of the transitionmetal (TM) doped two-dimensional (2D) MoS 2 using ab initio calculations. The doping is achieved by substituting two or more Mo-atoms by TM-atoms of the 3d-series. Additionally, the effect of codoping on the 2D-MoS 2 by cation-cation and cation-anion pairs is also investigated. Our results demonstrate that the TM-doping of 2D-MoS 2 leads to a significant reduction of the energy gap and the appearance of magnetic features whose major characteristic is the ferromagnetic coupling of the TM-dopants. The latter is found to be significantly enhanced by codoping as demonstrated by codoping with (Co,Cu), (Ni,Cu), (Mn,Cu) and (Mn,Sb) codopant-pairs.