Modification of nonlinear optical (NLO) response due to lithium doping and lithium-phosphorus co-doping into the graphitic carbon nitride (g-C3N4) monolayer has been explored by density functional theory (DFT). The energy gap (HOMO-LUMO) is shrunk from 3.89 eV for pristine g-C3N4 to 0.76 and 0.95 eV for lithium doped and lithium-phosphorus co-doped g-C3N4 monolayer respectively. The first hyper-polarizability (β) is also enhanced from 1.84 × 103 au of pristine g-C3N4 to 3.05 × 104 and 5.85 × 104 au for lithium doped and lithium-phosphorus co-doped g-C3N4 monolayer. An enhancement in the polarizability value is observed due to Li and P doping and co-doping into the g-C3N4 monolayer. The redshift of the absorption band is observed, which narrates the addition or alteration of a donor and acceptor. This article suggests that Li/P co-doped g-C3N4 is a possible NLO material with high-performance.