Industrial waste water contains abundant organic dyes, antibiotics, pesticides, chemical fertilizers or heavy metal ions, which seriously deteriorate the ecological environment. Among the practical techniques for solving the water pollution, photocatalysis is a kind of sustainable solar energy conversion technique for removing organic contaminants. In this review, the advances in the preparation, modification, and doping of graphitic carbon nitride (g-C3N4), including non-metal doping, metal doping, dual- or tri-doping, are introduced firstly. Then, we systematically review the recent progress of g-C3N4/metal oxide composite photocatalysts, including g-C3N4/n-type metal oxide, such as, TiO2, ZnO, SnO2, WO3, FexOy, CeO2, V2O5, MoO3, MnO2, Nb2O5, In2O3, and g-C3N4/p-type metal oxide, such as, Co3O4, Bi2O3, NiO and Cu2O. At last, we summarize the design principles for preparing heteroatom doped g-C3N4 and g-C3N4/metal oxide composites, and forecast the promising research directions. The main objective is to provide a guideline for designing high-performance heteroatom doped g-C3N4 and g-C3N4/metal oxide photocatalysts.