A new protocol for the photoinduced copper(I)-catalyzed azide-alkyne cycloaddition (CuAAC) was developed. The system utilizes mesoporous graphitic carbon nitride (mpg-N3C4) as a heterogeneous photocatalyst to realize the in situ formation of the required copper(I) catalyst by reducing copper(II) species upon UV or sunlight irradiation. The efficiency of the system in regard to its ability to photoinitiate the CuAAC of a variety of aliphatic and aromatic azides and alkynes in different solvents was examined. Photocalorimetric measurements confirmed that the rate of the reaction depends on the light intensity and continuous or intermittent irradiation. Importantly, because of the heterogeneous nature of the photocatalyst, mpg-C3N4 can easily be separated and reused in further reactions without loss of activity.