Although graphitic carbon nitride (g-C3N4) has been reported for several decades, it is still an active material at the present time owing to its amazing properties exhibited in many applications, including photocatalysis. With the rapid development of characterization techniques, in-depth exploration has been conducted to reveal and utilize the natural properties of g-C3N4 through modifications. Among these, the assembly of g-C3N4 with metal oxides is an effective strategy which can not only improve electron–hole separation efficiency by forming a polymer–inorganic heterojunction, but also compensate for the redox capabilities of g-C3N4 owing to the varied oxidation states of metal ions, enhancing its photocatalytic performance. Herein, we summarized the research progress on the synthesis of g-C3N4 and its coupling with single- or multiple-metal oxides, and its photocatalytic applications in energy production and environmental protection, including the splitting of water to hydrogen, the reduction of CO2 to valuable fuels, the degradation of organic pollutants and the disinfection of bacteria. At the end, challenges and prospects in the synthesis and photocatalytic application of g-C3N4-based composites are proposed and an outlook is given.