Effective doping techniques that precisely and locally control the conductivity and carrier polarity, i.e., electron (n-type) or hole (p-type), play a vital role in the remarkable success of Si-based technology and thus are critical for developing useful devices based on two-dimensional layered transition-metal dichalcogenides (TMDs). In contrast to the previous approaches based on either chemical doping or phase transition that requires complex chemicals or a high thermal budget and shows limited tunability and reliability, we propose a simple yet effective electron-beam irradiation (EBI) technique as an alternative for facilitating polarity transformation and transport modulation in selected regions. The EBI process may generate a precise amount of native chalcogen defects in both MoS2 and MoTe2 by controlling the EBI dosage. First-principles simulations support that the presence of native chalcogen vacancies may substantially reduce the band gaps of TMDs. In MoTe2, the progressive evolution of p-type conduction, n-type conduction, to metallic-like conduction can be observed with increasing EBI dosage. The high conductivity of metallic-like MoTe2 induced by EBI is comparable to that in a metallic 1T′-MoTe2, demonstrating the ability to selectively form extremely conductive regions in semiconducting TMDs. The proposed EBI technique could be potentially applied to a wide range of layered TMDs and facilitate the development of high-performance TMD-based devices in the future.