The hydrogenation of nitrobenzene into aniline is one of industrially important reactions, but still remains great challenge due to the lack of highly active, chemo-selective and eco-friendly catalyst. By using extensive density functional theory (DFT) calculations, herein we predict that single Pt atom decorated g-C3N4 (Pt@g-C3N4) exhibits excellent catalytic activity and selectivity for the conversion of nitrobenzene into aniline under visible light. The overall activation energy barrier for the hydrogenation of nitrobenzene on single atom Pt@g-C3N4 catalyst is even lower than that of the bare Pt(111) surface. The dissociation of N–O bonds on single Pt atom is triggered by single hydrogen atom rather than double hydrogen atoms on the Pt(111) surface. Moreover, the Pt@g-C3N4 catalyst exhibits outstanding chemoselectivity towards the common reducible substituents, such as phenyl,–C=C,–C≡C and–CHO groups during the hydrogenation. In addition, the doped single Pt atom can significantly enhance the photoconversion efficiency by broadening the light absorption of the pristine g-C3N4 to visible light region. Our results highlight an interesting and experimentally synthesized single-atom photocatalyst (Pt@g-C3N4) for efficient hydrogenation of nitrobenzene to aniline under a sustainable and green approach.[Figure not available: see fulltext.].