Coal gangue, a solid waste from coal mining and processing, has raised concerns about its environmental impact. Graphitic carbon nitride (g-C3N4) is promising for photocatalytic decomposition of organic pollutants, but its performance is hampered by its inherent defects. In this study, the compound of coal gangue and g-C3N4 was formed by in-situ loading g-C3N4 on the surface of coal gangue. After recombination, the morphology of g-C3N4 changes from block structure to tremella nanosheet. This change not only increases the specific surface area of g-C3N4, but broadens the light absorption spectrum of g-C3N4. Compared with the original g-C3N4, the photocurrent of the complex in visible light increased by 2 times, and the tetracycline degradation rate was 2.1 times faster. The structure, optical properties, band structure, morphology and charge transfer mechanism of the composite were analyzed by a series of characterization techniques. It was found that coal gangue can promote the space charge transfer and separation of g-C3N4. The cyclic test compound has good activity stability. In this paper, a strategy of comprehensive utilization of coal gangue is proposed. This strategy can not only reduce the environmental risk of coal gangue, but provide carbon nitride based photocatalytic materials with superior photocatalytic properties.