Density functional theory is used to systematically study the electronic properties of doped MoS2 monolayers, where the dopants are incorporated both via S/Mo substitution or as adsorbates. Among the possible substitutional dopants at the Mo site, Nb is identified as suitable p-type dopant, while Re is the donor with the lowest activation energy. When dopants are simply adsorbed on a monolayer we find that alkali metals shift the Fermi energy into the MoS2 conduction band, making the system n type. Finally, the adsorption of charged molecules is considered, mimicking an ionic liquid environment. We find that molecules adsorption can lead to both n- and p-type conductivity, depending on the charge polarity of the adsorbed species. © 2013 American Physical Society.