Two-dimensional (2D) semiconductors are considered one of the most promising channel materials in devices for the future development of integrated circuits with low power consumption and high integration. As the size of the device gradually decreases, a key challenge is to reduce the contact resistance of nanoscale devices. Doping is a crucial strategy to realize low contact resistances in 2D devices, but there is still lack of simple and compatible doping methods. Here, we report a simple and localized doping strategy that adopts an ultrathin lithium phosphorus oxynitride (LiPON) as the buffer layer of electrodes to reduce the contact resistance of MoS2 transistors. This ultrathin buffer layer induces strong n-doping in the electrode contact area, thereby achieving nearly Ohmic contact in the devices. The contact resistances of LiPON/Ti/Au electrodes for different channel carrier densities are all lower than those of Ti/Au electrodes because the Schottky barrier height (SBH) for the LiPON/Ti/Au electrodes is only 8% of the value for the Ti/Au electrodes. This work provides a simple and compatible strategy for the development of high-performance 2D devices and deepens the understanding of the important role of doping in 2D electrical contacts.