Layered transition metal dichalcogenides (TMDs) draw much attention as the key semiconducting material for two-dimensional electrical, optoelectronic, and spintronic devices. For most of these applications, both n- and p-type materials are needed to form junctions and support bipolar carrier conduction. However, typically only one type of doping is stable for a particular TMD. For example, molybdenum disulfide (MoS2) is natively an n-type presumably due to omnipresent electron-donating sulfur vacancies, and stable/controllable p-type doping has not been achieved. The lack of p-type doping hampers the development of charge-splitting p-n junctions of MoS2, as well as limits carrier conduction to spin-degenerate conduction bands instead of the more interesting, spin-polarized valence bands. Traditionally, extrinsic p-type doping in TMDs has been approached with surface adsorption or intercalation of electron-accepting molecules. However, practically stable doping requires substitution of host atoms with dopants where the doping is secured by covalent bonding. In this work, we demonstrate stable p-type conduction in MoS2 by substitutional niobium (Nb) doping, leading to a degenerate hole density of ∼ 3 × 10(19) cm(-3). Structural and X-ray techniques reveal that the Nb atoms are indeed substitutionally incorporated into MoS2 by replacing the Mo cations in the host lattice. van der Waals p-n homojunctions based on vertically stacked MoS2 layers are fabricated, which enable gate-tunable current rectification. A wide range of microelectronic, optoelectronic, and spintronic devices can be envisioned from the demonstrated substitutional bipolar doping of MoS2. From the miscibility of dopants with the host, it is also expected that the synthesis technique demonstrated here can be generally extended to other TMDs for doping against their native unipolar propensity.