the electronic and topological properties of MoS monolayers with n-p codoping effect are investigated by using first-principles calculations. Two types of the doped Nb atoms play the roles of the p-type and n-type dopants, respectively. The n-p codoping is found inducing a large valley polarization, associated with the strong magnetization induced by the Nb dopants. Interestingly, the system simultaneously owns a perfect Chern insulating band gap opened exactly at the Fermi level. The nontrivial band gap comes from the lifting of the degeneracy of the d xz and d yz orbitals of nb 2 atoms after the spin-orbit coupling is considered. Our work inspires exciting prospects to tune the novel properties of materials with n-p codoping effects. Recently, transition-metal dichalcogenides (TMDs) have been proposed as excellent candidates for electronics, spintronics, and valleytronics materials by manipulating the charge, spin, and valley degrees of freedom in the system 1-4. For example, the experimental realization of valley polarization could be through optical pumping 5,6 in MoS 2 monolayers (MLs) or externally applied magnetic fields 7-9 in WSe 2 and MoSe 2 monolayers. The approach of optical pumping is, however, restricted by the limited carrier lifetimes in dynamical process. And the valley polarization achieved through an external magnetic field is generally quite small. An alternative way to control the valley degree of freedom in TMDs is through magnetic atom doping 10,11 or the proximate effect from magnetic substrates 12. N-p codoping, with both n-type and p-type dopants in one material, has been proved to be an effective strategy to tune the electronic properties 13-15. Ferromagnetic (FM) order was reported in graphene with NiB codoping 13. And quantum anomalous Hall effect was predicted in graphene 14 and Sb 2 Te 3 15 through n-p codoping. In this work, we explore the electronic structures and valleytronics in the MoS 2 monolayer with n-p codoping. Very large valley polarization at the MoS 2 valence bands is obtained, attributed to the imbalance of K and K′ bands aroused by the magnetic Nb dopants. Chern insulating states are also found in the system. The coexistence of valley polarization and Chern insulating effects in the MoS 2 ML with Nb n-p codoping demonstrates that this kind of system has potential applications in not only valleytronics, but also electronics and spintronics, which will greatly facilitate the device integration in practice.