Molecular doping of organic semiconductor is a great strategy for significantly regulating the electronic band structure of organic semiconductor while increasing charge mobility and carrier concentration. Here, a facile strategy is presented by introducing 2D g-C3N5 as a p-dopant into PM6, improving the charge mobility and hole carrier concentration of PM6. Moreover, the electron transfer between PM6 and g-C3N5 can effectively downshift the Fermi energy level and highest occupied molecular orbital (HOMO) energy level of PM6, which leads to the increase the built-in electric field of organic solar cells (OSCs). The addition of g-C3N5 also effectively enhances the crystallization of active layer, thereby improving the stability of OSCs. As a result, a champion bulk-heterojunction (BHJ) and layer-by-layer (LbL) structure OSCs are successfully achieved featuring a high-power conversion efficiency of 18.10%/18.25%, simultaneously having excellent device stability. This work shows that introducing a low concentration dopant into organic donor is an effective method for improving the electrical performance of organic donor and the efficiency of OSCs.