This work presents a systematic study of the effect of fabrication temperature (450 to 650 o C) on the structure and electronic properties of g-C3N4 prepared from melamine. The work is conducted by X-ray diffraction, elemental analysis, BET nitrogen adsorption, UV-vis absorption, and electron paramagnetic resonance (EPR). The photocatalytic activity is tested for hydrogen production in the presence of oxalic acid (OA) as well as triethanolamine (TEOA). A considerable change in the morphology is observed with increasing the synthesis temperature resulting in an increase of the surface area, likely due to thermal etching at elevated temperatures. The decrease of charge carriers' concentration, per unit area, with annealing temperatures may be due to the decrease of the conjugation of the polymer. Probing the activity of g-C3N4 for hydrogen evolution reinforced this conclusion, the rate of hydrogen evolution per unit area for OA as well as TEOA decreased with annealing temperatures. An interesting finding is the correlation between CO2:H2 ratio and the increase in the band gap of g-C3N4 prepared at different temperatures when using oxalic acid as an electron donor. This suggests that water oxidation becomes easier with increasing band gap energy, probably due to a lowering of the valence band edge.