Elements doping is a powerful way to alter the electronic structure and enhancing the photo catalytic activity of materials by relaxing the surrounding chemical bonds and forming new chemical bond. In this work, we have performed, the first principle density functional theory calculations to investigate the geometric, electronic and optical properties of pristine, Na-doped and P-doped as well as Na and P (Na/P) co-doped heptazine based monolayer graphitic carbon nitride (g-C3N4). The co-doping process results in significantly narrow band gap of g-C3N4. The optical absorption shows better visible-light response compare to pristine g-C3N4. After doping the highest occupied molecular orbitals (HOMO) and lowest unoccupied molecular orbitals (LUMO) show strong delocalization and indicates photo generated electron/hole (e-/h+) pair disunion abilities of doped systems are superior than pristine heptazine based monolayer g-C3N4. Thus the co-doping with Na and P elements is an effective technique to boost the photocatalytic performance of heptazine based monolayer g-C3N4.