To solve environmental-related issues (wastewater remediation, energy conservation and air purification) caused by rapid urbanization and industrialization, synthesis of novel and modified nanostructured photocatalyst has received increasing attention in recent years. We herein report the facile synthesis of in situ nitrogen-doped chemically anchored TiO2 with graphene through sol-gel method. The structural analysis using X-ray diffraction showed that the crystalline nitrogen-doped graphene-titanium dioxide (N-GT) nanocomposite is mainly composed of anatase with minor brookite phase. Raman spectroscopy revealed the graphene characteristic band presence at low intensity level in addition to the main bands of anatase TiO2. X-ray photoelectron spectroscopy analysis disclosed the chemical bonding of TiO2 with graphene via Ti-O-C linkage, also the substitution of nitrogen dopant in both TiO2 lattice and into the skeleton of graphene nanoflakes. UV-Vis absorption spectroscopy analysis established that the modified material can efficiently absorb the longer wavelength range photons due to its narrowed band gap. The N0.06-GT material showed the highest degradation efficiency over methylene blue (MB, ∼98%) under UV and sulfamethoxazole (SMX, ∼ 90.0%) under visible light irradiation. The increased activity of the composite is credited to the synergistic effect of high surface area via greater adsorption capacity, narrowed band gap via increased photon absorption, and reduced e-/h+ recombination via good electron acceptability of graphene nanoflakes and defect sites (Ti3+ and oxygen vacancy(Vo)). The ROS experiments further depict that primarily hydroxyl radicals (OH•) and superoxide anions (O2•-) are responsible for the pollutant degradation in the process redox reactions. In summary, our findings specify new insight into the fabrication of this new material whose efficiency can be further tested in applications like H2 production, CO2 conversion to value-added products, and in energy conservation and storage.