g-C3N4 and P25 organic–inorganic composite with varying the content of g-C3N4 has been synthesized through facile mixing and heating method. The composite was characterized by X-ray diffraction, high-resolution transmission electron microscopy (HRTEM) and UV-vis diffuse reflection spectroscopy, Fourier transform infrared (FT-IR) spectroscopy, X-ray photoelectron spectroscopy (XPS) and BET surface area measurements. The activity of composite photocatalyst g-C3N4–P25 with 60% or 80% g-C3N4 for photoreduction of CO2 is higher than that of either single-phase g-C3N4 or P25 under visible light irradiation. The as-prepared organic-inorganic composite exhibits an improved photocatalytic activity due to enhancement of electron–hole separations both at the interface and in the semiconductors.