An amorphous/crystalline g-C3N4 homojunction was prepared for the first time at high temperature, in which the ratio of crystalline g-C3N4 in the homojunction was optimized. The homogenous junction with a matched energy level structure resulted in a superior photocatalytic performance for the degradation of organic pollutants and H2 evolution from splitting water under visible light irradiation.