In this study, the ethanol dispersion procedure was implemented to prepare the g-C3N4/N–TiO2 nanocatalyst structure. Sol-gel synthesis is utilized for synthesizing N–TiO2 and g-C3N4 via urea thermal decomposition. Physicochemical properties of produced photocatalysts were revealed using PL imaging, UV–vis DRS, XRD, FTIR, SEM, BET, and TEM. Evaluation of photocatalytic activity of synthetic photocatalysts by exposure to sunlight and degradation of methylene blue (MB) dye. g-C3N4/N–TiO2 NCs showed excellent photocatalytic activity, reaching 96 % MB degradation efficiency in 80 min. g-C3N4 and N–TiO2 doped form a nanocomposite structure that increases photocatalytic activity, affecting charge separation performance and service life. The system also exhibits the ability to collect visible and ultraviolet light. Even after four consecutive cycles, the efficiency of the MB is still above 85 %. Capture experiments showed that the decomposition of MB was mainly caused by h+ and O22− radicals. The results of kinetic investigations indicate that the degradation rate of g-C3N4/N–TiO2 nanocomposites surpasses that of N–TiO2 nanoparticles.