Green chemistry is attracting more attention and effort than ever before because it can provide sustainability of environments and energy from noncarbon-based fuels. Semiconductor photocatalysis has been under extensive study since the 1970s for many applications, especially in the reduction of carbon dioxide to fuel and the production of hydrogen gas by water splitting. The working principle of a photocatalyst is that irradiation of light onto a catalyst will excite an electron from the valence band to the conducting band and leave a hole (h+) and an extra electron (e-) in the corresponding band. The ‘hole’ will act as an oxidant and get itself refilled by getting an electron from a reductant; the ‘extra electron’ will act as a reductant and combine with an oxidant. The mechanistic principle can also be applied to organic redox reactions. Here is presented green chemistry in the reduction of azo and nitro groups in organic compounds based on photocatalysis. The semiconductor photocatalyst used in the reactions is graphitic carbon nitride (g-C3N4), which was prepared by pyrolysis of melamine at different temperatures. The reductions were carried out in an aqueous solution under visible light. Our experimental results revealed that the rate of reduction of azo compounds to amine is greatly enhanced. The photocatalytic activity of g-C3N4 in this reduction exhibited great dependence on the temperature at which the catalyst is prepared. The application of g-C3N4 as photocatalysts to nitro group reductions has also been explored. The experimental details and results will be presented. A plausible mechanism will be provided.